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

Commit c7c7180

Browse files
committed
fix(menu): menu not closing with clicks that disable element
closes #3288
1 parent 4be344b commit c7c7180

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/menu/menu-interim-element.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ function MenuProvider($$interimElementProvider) {
145145
});
146146

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

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

0 commit comments

Comments
 (0)