mirror of
https://github.com/google/material-design-lite.git
synced 2024-09-20 08:38:27 +03:00
Menu: fix early-menu-hide bug when click on menu item (closes #1706)
This commit is contained in:
parent
3063d39fcb
commit
39dfe0d251
@ -409,7 +409,9 @@
|
||||
// displayed the menu in the first place. If so, do nothing.
|
||||
// Also check to see if the menu is in the process of closing itself, and
|
||||
// do nothing in that case.
|
||||
if (e !== evt && !this.closing_) {
|
||||
// Also check if the clicked element is a menu item
|
||||
// if so, do nothing.
|
||||
if (e !== evt && !this.closing_ && e.target.parentNode !== this.element_) {
|
||||
document.removeEventListener('click', callback);
|
||||
this.hide();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user