PolymerElements / iron-menu-behavior

Accessible menu behavior
18 stars 28 forks source link

'Esc' key unexpectedly propagates to parent nodes. #77

Open freshp86 opened 8 years ago

freshp86 commented 8 years ago

See repro at https://jsfiddle.net/no958fqr/.

This is causing problems, for example when a paper-dropdown-menu resides within a dialog. Hitting the 'esc' key when the dropdown menu is focused should only close the dropdown menu, but not the dialog. This is affecting Chrome's new Settings page, see https://bugs.chromium.org/p/chromium/issues/detail?id=638518.

/cc @danbeam

danbeam commented 8 years ago

/cc @bicknellr @notwaldorf

danbeam commented 8 years ago

@tjsavage

JanMiksovsky commented 8 years ago

@valdrinkoshi Is this already addressed by the fix for PolymerElements/iron-overlay-behavior#212?

valdrinkoshi commented 8 years ago

No, this is different, as the request is to have the overlay stop the event's propagation. @freshp86 @danbeam iron-overlay-behavior already provides the event iron-overlay-canceled which detail is the source event. You could listen to that event and stop the propagation yourself too event.detail.stopPropagation()