diff --git a/iron-a11y-keys-behavior.html b/iron-a11y-keys-behavior.html index 807fe2d..be64729 100644 --- a/iron-a11y-keys-behavior.html +++ b/iron-a11y-keys-behavior.html @@ -255,6 +255,15 @@ } }, + /** + * If true, this property will cause the implementing element to + * automatically stop propagation on any handled KeyboardEvents. + */ + stopKeyboardEventPropagation: { + type: Boolean, + value: false + }, + _boundKeyHandlers: { type: Array, value: function() { @@ -398,6 +407,10 @@ }, _onKeyBindingEvent: function(keyBindings, event) { + if (this.stopKeyboardEventPropagation) { + event.stopPropagation(); + } + keyBindings.forEach(function(keyBinding) { var keyCombo = keyBinding[0]; var handlerName = keyBinding[1]; diff --git a/test/basic-test.html b/test/basic-test.html index 8e50c92..fea60b6 100644 --- a/test/basic-test.html +++ b/test/basic-test.html @@ -30,6 +30,12 @@ + + + +