Editor checkbox not behaving correctly (CSS)
Editor checkbox not behaving correctly (CSS)
in Editor
Current Version: DataTables 3.0.2 / Editor 3.0.1
There is a CSS issue with Editor checkbox which doesn't render correctly when clicking in it. The first click only highlights the field (focus), but doesn't show the checkmark. Only after you click somewhere else, the checked display is shown.
The CSS interfering with the checkbox rendering is:
div.DTE_Field input, div.DTE_Field textarea {
transition: background-color ease-in-out .15s;
}
div.DTE_Field input:focus, div.DTE_Field textarea:focus {
background-color: #ffe;
}
The problem is the 'broad' definition of input, which results in checkboxes or radio buttons to behave like regular inputs.
This is the fix I applied to my own CSS:
/* Editor checkbox/radio checked-state repaint fix */
div.DTE_Field input[type="checkbox"],
div.DTE_Field input[type="radio"] {
transition: none;
}
div.DTE_Field input[type="checkbox"]:focus,
div.DTE_Field input[type="radio"]:focus {
background-color: transparent;
}
Answers
Ah, I noticed an 'overwrite' of styles because of WordPress CSS rules being applied. The issue is with '-webkit-appearance: none' because WP styles checkboxes differently (and apparently recent changes in WP are interfering with my datatables and editor styles and scripts).
So in case anyone has the same issue:
Interesting - many thanks for letting me know that WordPress' admin styling is causing the issue here. Possibly I should add
appearance: radioto the stylesheet for Editor to try and force the correct value.Allan