Uploaded image for project: 'Wave'
  1. Wave
  2. WAVE-291

Disabled submenu in toolbar incorrectly opens when clicked

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Web Client
    • None

    Description

      When adding a submenu in a toolbar, clicking on the corresponding button always opens the menu, whether the SubmenuToolbarView is in State.DISABLED or not.
      This is because a submenu is made of a ToolbarToggleButton and a SubmenuToolbarWidget (which itself is an AbstractToolbarButton) both controlling the same ToolbarButtonUi.
      Calling setState(State.DISABLED) on the SubmenuToolbarWidget (returned as a SubmenuToolbarView by the addSubmenu method) calls setState(State.DISABLED) on the ToolbarButtonUi so the button appears disabled; but the ToolbarToggleButton isn't updated, so it's internal check for !isDisabled() in its onClick method fails and it always toggles the button.

      Attachments

        Activity

          People

            Unassigned Unassigned
            t.broyer Thomas Broyer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified