Skip to content

Commit

Permalink
Only check for one open menu.
Browse files Browse the repository at this point in the history
  • Loading branch information
huwshimi committed Aug 20, 2014
1 parent 370e151 commit afd157f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/widgets/machine-view-panel.js
Expand Up @@ -159,11 +159,14 @@ YUI.add('machine-view-panel', function(Y) {
// Need to halt the event here before it triggers the
// clickoutside event on the widget.
e.halt();
var openMenu = this.get('container').one('.yui3-moremenu.open');
var id = e.currentTarget.ancestor('.unplaced-unit').getData('id');
// The clickoutside won't work here to close all the more
// menus due to the halt above, so close all the open menus
// manually.
this.get('container').all('.yui3-moremenu.open').removeClass('open');
var id = e.currentTarget.ancestor('.unplaced-unit').getData('id');
if (openMenu) {
openMenu.removeClass('open');
}
this.get('unitTokens')[id].toggleMoreMenu();
},

Expand Down

0 comments on commit afd157f

Please sign in to comment.