Opened 15 years ago
Closed 15 years ago
#5040 closed Bug (fixed)
Font dropdown not working after font change on a selected text
Reported by: | Diego Caravana | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.2 |
Component: | Core : Styles | Version: | 3.1 |
Keywords: | Confirmed Review+ | Cc: | diego@… |
Description
Apparently a Firefox-only problem.
Changing the font on a selected text causes the font dropdown to not to show the font itself, even if it was correctly applied to the text. To make it work again, change the size of the same text.
As you can see in the following example, the HTML of the content is very simple; it seems that if the span with the font-family spec comes before the font-size one the font dropdown doesn't recognize the font (selecting the size swaps the two spans so it works again):
<p><span style="font-size: 12px;"><span style="font-family: Arial,Helvetica,sans-serif;">Example...</span></span></p>
Attachments (1)
Change History (7)
comment:1 Changed 15 years ago by
Component: | General → Core : Styles |
---|---|
Keywords: | WorksForMe added |
comment:2 Changed 15 years ago by
I copied and pasted your HTML code as is and I have the problem; at this point I don't know why we have different behaviors. I'll check the editor instance configuration and report to you ASAP.
comment:3 Changed 15 years ago by
Ok, verified and the problem lies in the definition of the font list which, in my case, is:
CKEDITOR.config.font_names = 'Arial/Arial, Helvetica, sans-serif;Courier New/Courier New, Courier, monospace;Futura;Optima;';
Look at the last semicolon in the string: if you remove it, as I did, the problem goes away. Now I don't know if it's an editor bug, all I know is that this problem exists in a browser and not in another one (i.e. different behavior).
Changed 15 years ago by
Attachment: | 5040.patch added |
---|
comment:4 Changed 15 years ago by
Keywords: | Confirmed Review? added; WorksForMe removed |
---|---|
Milestone: | → CKEditor 3.2 |
@dcaravana, thanks for the details. In fact you're using the font_names settings improperly, as the semi-colon here is a separator, not a CSS rule marker.
In any case, we may change our code to avoid issues with such minor user mistakes. i'm proposing a patch for it.
comment:5 Changed 15 years ago by
Keywords: | Review+ added; Review? removed |
---|
I'm loading the following in FF3.5:
In both paragraphs the font face and size are properly recognized and displayed in the toolbar combos. To test it, I'm simply clicking inside the text in the paragraphs.
Am I missing something?