PolymerElements / iron-a11y-keys

A basic element implementation of iron-a11y-keys-behavior
19 stars 22 forks source link

stopKeyboardEventPropagation doesn't stop propagation #35

Closed ryanwtyler closed 7 years ago

ryanwtyler commented 7 years ago

when i have <iron-a11y-keys id="keys" keys="meta+s" target="[[target]]" on-keys-pressed="_updatePressed" stopKeyboardEventPropagation> </iron-a11y-keys>

and click cmd-s the event handler _updatePressed is called but the event gets to window and the browser save is executed. i can prevent the event from bubbling by calling e.detail.keyboardEvent.preventDefault(); in the event handler

Expected outcome

event is captured and propagation is stopped

Actual outcome

browser save is run

Live Demo

Steps to reproduce

Browsers Affected

notwaldorf commented 7 years ago

/cc @valdrinkoshi

valdrinkoshi commented 7 years ago

properties must be set in the markup with hyphens instead of camel case, e.g. <iron-a11y-keys id="keys" keys="meta+s" target="[[target]]" on-keys-pressed="_updatePressed" stop-keyboard-event-propagation> </iron-a11y-keys>