I am seeing a problem in Firefox only, and I'm wondering if there is a way around it, or if it is a bug.
Steps to reproduce:
1. Go to one of the demo pages (e.g., http://ckeditor.com/demo)
2. Double click to select one of the words that does not have a style applied to it (I chose the word "famous" in the first line, but it really doesn't matter what you choose).
3. Apply the Bold style to the text by either clicking the Bold button, or hitting Ctrl-B
4. Now, with the text still selected, start typing (so that the selected text is replaced by the new text you are typing).
I expect to see the new text retain the bold styling, which is what I see in Chrome and IE 7, 8, and 9. However in Firefox, the Bold button is deselected, and the new text is not bolded.
ETA: Firefox version is 16.0.1, OS: Windows 7 Professional
Tue, 10/16/2012 - 17:22
#1
Re: Problem (bug?) with style selection behavior in Firefox
There's no way around right now and it's not a bug :) It's rather lack of a feature. I'm guessing that this difference exists because at some point we're basing on browser behaviour. Without another custom layer about which we are thinking (but I don't know what is the chance to impl it) it won't be easily fixable.
PS. You wrote perfect issue description, but in a wrong place :) This would better fit on our bug tracker http://dev.ckeditor.com
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: Problem (bug?) with style selection behavior in Firefox
Is there any ticket in your tracking system for the "custom layer" you mentioned that I could/should be watching? I tried searching your ticket system, but was not able to find anything (I realize you said you are just thinking about it, so perhaps it's not even a ticket yet).
We have an application in which we are using CKEditor to allow a user to specify some custom styling within text they are editing. We wrote a plugin which defines our own command that works much like things like bold and italic do, except that if they select the button for that command without any text selected, we insert and preselect some prompt text that has our custom style applied to it. Once they start typing, the desire is that our custom style continues to be applied to the text they start typing. At first I thought this problem was a bug in our code, until I realized that i could reproduce the same behavior with things like bold and italic.
We are dependent on this behavior being consistent, which is why I'm so interested in seeing this work.