-
Notifications
You must be signed in to change notification settings - Fork 3.4k
<md-menu> only close with md-button with ng-click, need to be same with ng-href #3397
Comments
If this is a problem I'd suspect |
The current implementation can also lead to following JS error.
Caused by the function that is trigger when you close the menu. do {
- if (target && target.hasAttribute('ng-click')) {
+ if (target && target.nodeType == 1 && target.hasAttribute('ng-click')) {
if (!target.hasAttribute('disabled')) {
close();
}
break;
}
- } while ((target = target.parentNode) && target != opts.menuContentEl)
+ } while ((target = target.parentNode) && target != opts.menuContentEl[0]) |
@hthetiot |
👍 Faced this issue. I'm using ui-sref / ng-href. Maybe a copepen could help : http://codepen.io/anon/pen/yNPOBV -> Click on the first "Redial" menu item, and see the error thrown. |
There is also a problem using 'data-ng-click' instead of 'ng-click'. Actually it doesn't work with 'data' prefix (FF and Chrome), works fine with ng-click. |
same problem here! any suggestion? |
same problem here, can this be fixed ? |
+1 with ui-router |
+1 with ui-router ui-sref |
// deleted, sorry guys my bad |
md-menu-item
md-button ng-href="/user-info">Edit User Info</md-button
/md-menu-item>
currently this needs to be
md-menu-item>
md-button ng-click="" ng-href="/user-info">Edit User Info</md-button
/md-menu-item>
make ng-href works same as ng-click, doesn't this look natural?
The text was updated successfully, but these errors were encountered: