[
https://issues.apache.org/jira/browse/WAVE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13095995#comment-13095995
]
Thomas Broyer commented on WAVE-291:
------------------------------------
Review at http://codereview.waveprotocol.org/616001
> Disabled submenu in toolbar incorrectly opens when clicked
> ----------------------------------------------------------
>
> Key: WAVE-291
> URL: https://issues.apache.org/jira/browse/WAVE-291
> Project: Wave
> Issue Type: Bug
> Components: Web Client
> Reporter: Thomas Broyer
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> 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.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira