Skip to content

Commit

Permalink
Enable _removeListener after Polymer/polymer#1740
Browse files Browse the repository at this point in the history
Polymer/polymer#1740 adds `unlisten` functionality, thus fixing blocking issue Polymer/polymer#1639. Now `iron-selector` can properly remove the event listener for the old activate event when it is changed instead of being forced to ignore unwanted calls handler calls.
  • Loading branch information
adalinesimonian committed Jun 12, 2015
1 parent 2ba2a8c commit d8ed602
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions iron-selectable.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,7 @@
},

_removeListener: function(eventName) {
// There is no unlisten yet...
// https://github.com/Polymer/polymer/issues/1639
//this.removeEventListener(eventName, this._bindActivateHandler);
this.unlisten(this, eventName, '_activateHandler');
},

_activateEventChanged: function(eventName, old) {
Expand Down Expand Up @@ -277,11 +275,6 @@
},

_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) {
Expand Down

0 comments on commit d8ed602

Please sign in to comment.