Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(menu): menu not closing with clicks that disable element
Browse files Browse the repository at this point in the history
closes #3288
  • Loading branch information
rschmukler committed Jun 28, 2015
1 parent 4be344b commit c7c7180
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/menu/menu-interim-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function MenuProvider($$interimElementProvider) {
});

// Close menu on menu item click, if said menu-item is not disabled
opts.menuContentEl.on('click', function(e) {
opts.menuContentEl[0].addEventListener('click', function(e) {
var target = e.target;
// Traverse up the event until we get to the menuContentEl to see if
// there is an ng-click and that the ng-click is not disabled
Expand Down Expand Up @@ -174,7 +174,7 @@ function MenuProvider($$interimElementProvider) {
}
return false;
}
});
}, true);

// kick off initial focus in the menu on the first element
var focusTarget = opts.menuContentEl[0].querySelector('[md-menu-focus-target]');
Expand Down

0 comments on commit c7c7180

Please sign in to comment.