Skip to content

Commit 98e1dcf

Browse files
author
Jan Tagscherer
committed
Always keep animation end listener active, fixes PolymerElements#132
1 parent 50726d7 commit 98e1dcf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

paper-tooltip.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ Polymer({
339339
*/
340340
attached: function() {
341341
this._findTarget();
342+
this.listen(this.$.tooltip, 'animationend', '_onAnimationEnd');
342343
},
343344

344345
/**
@@ -347,6 +348,7 @@ Polymer({
347348
detached: function() {
348349
if (!this.manualMode)
349350
this._removeListeners();
351+
this.unlisten(this.$.tooltip, 'animationend', '_onAnimationEnd');
350352
},
351353

352354
/**
@@ -496,7 +498,6 @@ Polymer({
496498
this.listen(this._target, 'blur', 'hide');
497499
this.listen(this._target, 'tap', 'hide');
498500
}
499-
this.listen(this.$.tooltip, 'animationend', '_onAnimationEnd');
500501
this.listen(this, 'mouseenter', 'hide');
501502
},
502503

@@ -582,7 +583,6 @@ Polymer({
582583
this.unlisten(this._target, 'blur', 'hide');
583584
this.unlisten(this._target, 'tap', 'hide');
584585
}
585-
this.unlisten(this.$.tooltip, 'animationend', '_onAnimationEnd');
586586
this.unlisten(this, 'mouseenter', 'hide');
587587
}
588588
});

0 commit comments

Comments
 (0)