You found a bug! We've classified it as EXTGWT-2786 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Jan 2013
    Posts
    7
    Vote Rating
    0
    tgi is on a distinguished road

      0  

    Default HtmlEditor buttons do not get toggled properly when selecting text

    HtmlEditor buttons do not get toggled properly when selecting text


    Required Information

    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.


    Virtual Machine
    No

    Description
    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.

    Run mode
    Both.

    Steps to reproduce the problem
    1. Open http://www.sencha.com/examples/#Exam...:advancedforms
    2. In the rich text editor, enter "aaaa bbbb cccc"
    3. Select bbbb, click Bold, the bbbb text becomes bold and the button is highlighted.
    4. Select aaaa, the bold button stays highlighted.
    5. Click bold, the aaaa text becomes bold, the button isn't highlighted anymore.


    Expected result
    The state of the button should match the state of the selected text (highlighted only if all the selected text is bold).

    Actual result
    The state of the button only depends on whether it was clicked or not.

    Test case
    Sencha example.

    Helpful Information
    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.

    Live test
    http://www.sencha.com/examples/#Exam...:advancedforms

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,734
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    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/

  3. #3
    Sencha Premium Member feelinforyou's Avatar
    Join Date
    Dec 2012
    Posts
    99
    Vote Rating
    4
    feelinforyou is on a distinguished road

      0  

    Default


    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

Thread Participants: 2

Tags for this Thread