Closed JohnRDOrazio closed 2 years ago
even though it seems like an easy fix, I however find myself in the situation of not having full control over a specific website's stylesheets, so I cannot implement the fix manually. In any case, seeing that all such styles are being overriden by reset.css
, a new rule for select option:checked { background-color: COLOR }
should also be defined.
Hi @JohnRDOrazio, Thank you for the report. I can confirm such behavior, but only for Chrome / Edge. Even IE11 works fine in that manner.
Reproducible back to 4.14.0 - so no regression here.
Bug
I created a plugin for CKEditor 4, with a widget, and a dialog that has a number of form inputs that affect the contents of the widget. Among the form inputs, there are some select controls with the
multiple
attribute. However, I have noticed that after selecting options from the multiple select, as soon as the select loses focus none of the selected options are showing as selected.Upon examining closely, I noticed that rules from
editor.css
are overriding the browser styling on the select control. Specifically:is being overriden by rules from this block:
Upon examining
editor.css
, I found that the above referenced block is imported fromskins/moono-lisa/reset.css
:https://github.com/ckeditor/ckeditor4/blob/ee3949d19b95af2eef96ec561e647b2eb450bd64/skins/moono-lisa/reset.css#L44-L68
Specifically the problematic line is:
https://github.com/ckeditor/ckeditor4/blob/ee3949d19b95af2eef96ec561e647b2eb450bd64/skins/moono-lisa/reset.css#L51
Considering that there is no styling defined for selected options, the rule with
background: transparent
takes precedence and all options in the select control always have a transparent background whether they are selected or not (when the select control loses focus).Provide detailed reproduction steps (if any)
Expected result
The options selected in the first multiple select should show as being selected, just like the options in the second multiple select.
Actual result
The selected options in the first multiple select do not show as being selected when the select has lost focus.
Other details