You found a bug! We've classified it as
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
HtmlEditor buttons do not get toggled properly when selecting text
Version(s) of Ext GWT
3.0.1 (on sencha.com), 3.0.3 (our project)
Browser versions and OS
- Win 7-64 pro, Firefox 17 and 18.
The "togglable" buttons in the HtmlEditor do not behave properly when selection changes.
For example the bold button can be active, even when unbolded text is selected. It can be inactive even when bolded text is expected.
Steps to reproduce the problem
- Open http://www.sencha.com/examples/#Exam...:advancedforms
- In the rich text editor, enter "aaaa bbbb cccc"
- Select bbbb, click Bold, the bbbb text becomes bold and the button is highlighted.
- Select aaaa, the bold button stays highlighted.
- Click bold, the aaaa text becomes bold, the button isn't highlighted anymore.
The state of the button should match the state of the selected text (highlighted only if all the selected text is bold).
The state of the button only depends on whether it was clicked or not.
The same applies to Bold, Italic, Underline.
In a lesser extent to the font selector (maybe this is expected behavior, I'm not sure).
ExtJS doesn't seem to have the issue.
Thanks for the report! I've confirmed the issue and opened a bug in the issue tracker.
GXT 2 doesn't appear susceptible to this, as seen at http://www.sencha.com/examples-2/
Sencha Premium Member
The ColorMenu also behaves strange.
- The ColorMenu won't hide if you select a color
- You can't undo a color with the menu, maybe a button to remove the color or set the default color like word would be great
- If you select a text and highlight the text with a color an then select an other unhiglighted text (or highlighted), the old color is still selected in the ColorMenu (the last selected is always picked)
The last two points also appear in GXT2