Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Unified Diff: lib/src/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/src/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html
diff --git a/lib/src/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html b/lib/src/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html
index e95a298038e775f03d315d3761e8169837e6ab6c..be64729fbcdee225afad077d141c51b8f336fb0a 100644
--- a/lib/src/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html
+++ b/lib/src/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html
@@ -241,7 +241,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* `keys` property is pressed.
*
* @demo demo/index.html
- * @polymerBehavior IronA11yKeysBehavior
+ * @polymerBehavior
*/
Polymer.IronA11yKeysBehavior = {
properties: {
@@ -255,6 +255,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}
},
+ /**
+ * 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 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
},
_onKeyBindingEvent: function(keyBindings, event) {
+ if (this.stopKeyboardEventPropagation) {
+ event.stopPropagation();
+ }
+
keyBindings.forEach(function(keyBinding) {
var keyCombo = keyBinding[0];
var handlerName = keyBinding[1];
« no previous file with comments | « lib/src/iron-a11y-announcer/iron-a11y-announcer.html ('k') | lib/src/iron-a11y-keys-behavior/test/basic-test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698