Ticket #5026 (confirmed Bug)
Style detection/removal incorrect in FireFox
|Reported by:||n8behavior||Owned by:|
|Component:||Core : Styles||Version:||3.1|
Use Firefox (I tested on both Windows FF 3.5.7 and Linux FF 3.5.5) and the online demo and perform the following steps.
- Click in the editor and remove all content i.e. <CTRL> + <A> then <BKSP>
- Type or paste in: foo bar baz
- Double-click bar and make it bold. Notice That FF on Linux selects only the word bar on double-click. Chrome and IE8 on Windows select the word plus one trailing space, which also gets the bold style.
- Place the cursor anywhere in the word baz then move left with the arrow key to the end of the word bar. Notice that the B button is NOT active and the status bar displays only body p.
- Use the arrow keys to move left then right one character, returning to the same position. Notice that the B button is active and the status bar displays body p strong.
- Use the arrow keys to move right then left one character, again returning to the same position. Notice that the B button is NOT active and the status bar displays only body p.
This inconsistency is confusing my users and is likely related to the odd behave I will describe next.
- Again, place the cursor to anywhere in the word baz then move left with the arrow key to the end of the word bar.
- Backspace to the end of the word foo, completely deleting the word bar and the space between foo and bar.
- Type <space>bar to replace the original text. Notice that the text is bold again. But rather than a STRONG tag we have a SPAN with inline style.
Unless you delete both foo and bar you cannot get rid of the littered inline style. These tests exhibit the same behavior using italic and underline, and indeed my own custom styles. This behavior is not exhibited using Chrome nor IE8. I have tested this in 3.01, 3.02 and 3.1. All exhibit the bug in FF only.