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

Unified Diff: third_party/polymer/v0_8/components-chromium/iron-selector/iron-selectable-extracted.js

Issue 1162563004: Upgrade to 1.0 and switch clients to dom-repeat where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a layout import and remove the gzipped webanimation in reproduce.sh Created 5 years, 7 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: third_party/polymer/v0_8/components-chromium/iron-selector/iron-selectable-extracted.js
diff --git a/third_party/polymer/v0_8/components-chromium/iron-selector/iron-selectable-extracted.js b/third_party/polymer/v0_8/components-chromium/iron-selector/iron-selectable-extracted.js
index 644e0249a2153d44a43d911b8b6f8677862d9159..a17f626d0200b9f5af8284d1d74e6c3cb0d9efb1 100644
--- a/third_party/polymer/v0_8/components-chromium/iron-selector/iron-selectable-extracted.js
+++ b/third_party/polymer/v0_8/components-chromium/iron-selector/iron-selectable-extracted.js
@@ -1,5 +1,6 @@
+ /** @polymerBehavior */
Polymer.IronSelectableBehavior = {
properties: {
@@ -46,11 +47,11 @@
*
* @attribute activateEvent
* @type {string}
- * @default 'click'
+ * @default 'tap'
*/
activateEvent: {
type: String,
- value: 'click',
+ value: 'tap',
observer: '_activateEventChanged'
},
@@ -96,7 +97,6 @@
},
created: function() {
- this._bindActivateHandler = this._activateHandler.bind(this);
this._bindFilterItem = this._filterItem.bind(this);
this._selection = new Polymer.IronSelection(this._applySelection.bind(this));
},
@@ -170,11 +170,13 @@
},
_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) {
@@ -263,6 +265,11 @@
},
_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) {

Powered by Google App Engine
This is Rietveld 408576698