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

Commit f94820e

Browse files
committed
fix(menu): fix error on clicking on menu container element
closes #3252, closes #3369
1 parent e08f51d commit f94820e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,14 @@ function MenuProvider($$interimElementProvider) {
148148
// Traverse up the event until we get to the menuContentEl to see if
149149
// there is an ng-click and that the ng-click is not disabled
150150
do {
151+
if (target == opts.menuContentEl[0]) return;
151152
if (hasAnyAttribute(target, ['ng-click', 'data-ng-click', 'x-ng-click'])) {
152153
if (!target.hasAttribute('disabled')) {
153154
close();
154155
}
155156
break;
156157
}
157-
} while ((target = target.parentNode) && target != opts.menuContentEl)
158+
} while (target = target.parentNode)
158159

159160
function close() {
160161
scope.$apply(function() {

0 commit comments

Comments
 (0)