Skip to content

Commit

Permalink
Fix issue PolymerElements#86. iron-overlay-closed event bubbles up un…
Browse files Browse the repository at this point in the history
…expectedly
  • Loading branch information
dzyubadmytro committed Jul 15, 2021
1 parent 99a2aba commit 338fdc6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion paper-menu-button.html
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,13 @@
hostAttributes: {role: 'group', 'aria-haspopup': 'true'},

listeners:
{'iron-activate': '_onIronActivate', 'iron-select': '_onIronSelect'},
{
'iron-activate': '_onIronActivate',
'iron-select': '_onIronSelect',
'iron-overlay-opened': '__stopEventPropagation',
'iron-overlay-closed': '__stopEventPropagation',
'iron-overlay-canceled': '__stopEventPropagation'
},

/**
* The content element that is contained by the menu button, if any.
Expand Down Expand Up @@ -416,6 +422,10 @@
if (path.indexOf(trigger) > -1) {
event.preventDefault();
}
},

__stopEventPropagation: function(event) {
event.stopPropagation();
}
});

Expand Down

0 comments on commit 338fdc6

Please sign in to comment.