Index: third_party/polymer/v0_8/components/iron-selector/iron-selectable.html |
diff --git a/third_party/polymer/v0_8/components/iron-selector/iron-selectable.html b/third_party/polymer/v0_8/components/iron-selector/iron-selectable.html |
index bcfb6b216a4f2229352c07d07275c691e27a0519..f0506d58d9b5fab5a1701e5c4437f7e10f1b4f91 100644 |
--- a/third_party/polymer/v0_8/components/iron-selector/iron-selectable.html |
+++ b/third_party/polymer/v0_8/components/iron-selector/iron-selectable.html |
@@ -12,6 +12,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN |
<script> |
+ /** @polymerBehavior */ |
Polymer.IronSelectableBehavior = { |
properties: { |
@@ -58,11 +59,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN |
* |
* @attribute activateEvent |
* @type {string} |
- * @default 'click' |
+ * @default 'tap' |
*/ |
activateEvent: { |
type: String, |
- value: 'click', |
+ value: 'tap', |
observer: '_activateEventChanged' |
}, |
@@ -108,7 +109,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN |
}, |
created: function() { |
- this._bindActivateHandler = this._activateHandler.bind(this); |
this._bindFilterItem = this._filterItem.bind(this); |
this._selection = new Polymer.IronSelection(this._applySelection.bind(this)); |
}, |
@@ -182,11 +182,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN |
}, |
_addListener: function(eventName) { |
- this.addEventListener(eventName, this._bindActivateHandler); |
+ this.listen(this, eventName, '_activateHandler'); |
}, |
_removeListener: function(eventName) { |
- this.removeEventListener(eventName, this._bindActivateHandler); |
+ // There is no unlisten yet... |
+ // https://github.com/Polymer/polymer/issues/1639 |
+ //this.removeEventListener(eventName, this._bindActivateHandler); |
}, |
_activateEventChanged: function(eventName, old) { |
@@ -275,6 +277,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN |
}, |
_activateHandler: function(e) { |
+ // TODO: remove this when https://github.com/Polymer/polymer/issues/1639 is fixed so we |
+ // can just remove the old event listener. |
+ if (e.type !== this.activateEvent) { |
+ return; |
+ } |
var t = e.target; |
var items = this.items; |
while (t && t != this) { |