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

Commit

Permalink
fix(menu): fix error on clicking on menu container element
Browse files Browse the repository at this point in the history
closes #3252, closes #3369
  • Loading branch information
rschmukler committed Jun 21, 2015
1 parent e08f51d commit f94820e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/menu/menu-interim-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,14 @@ function MenuProvider($$interimElementProvider) {
// 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
do {
if (target == opts.menuContentEl[0]) return;
if (hasAnyAttribute(target, ['ng-click', 'data-ng-click', 'x-ng-click'])) {
if (!target.hasAttribute('disabled')) {
close();
}
break;
}
} while ((target = target.parentNode) && target != opts.menuContentEl)
} while (target = target.parentNode)

function close() {
scope.$apply(function() {
Expand Down

0 comments on commit f94820e

Please sign in to comment.