Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
ensure that the menu close action happens after the click action
Browse files Browse the repository at this point in the history
fix #6791
  • Loading branch information
bridiver authored and bbondy committed Jan 27, 2017
1 parent ba755c0 commit 8ca0127
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/components/contextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ContextMenuItem extends ImmutableComponent {
e.stopPropagation()
if (clickAction) {
if (shouldHide) {
windowActions.resetMenuState()
setImmediate(() => windowActions.resetMenuState())
}
clickAction(e)
}
Expand Down Expand Up @@ -253,7 +253,7 @@ class ContextMenuSingle extends ImmutableComponent {
*/
class ContextMenu extends ImmutableComponent {
onClick () {
windowActions.resetMenuState()
setImmediate(() => windowActions.resetMenuState())
}
get openedSubmenuDetails () {
return this.props.contextMenuDetail.get('openedSubmenuDetails') || new Immutable.List()
Expand Down

0 comments on commit 8ca0127

Please sign in to comment.