From 6a416f74093b7b082b987d8cec6bf38636b011b4 Mon Sep 17 00:00:00 2001 From: Jeongkyu Shin Date: Mon, 12 Feb 2018 11:35:32 +0900 Subject: [PATCH] * Bugfix : listener `track` tried to modify its DOM before in its constructor. - The element's attributes and children must not be inspected, as in the non-upgrade case none will be present, and relying on upgrades makes the element less usable --- paper-toggle-button.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/paper-toggle-button.html b/paper-toggle-button.html index e5540e1..c78172e 100644 --- a/paper-toggle-button.html +++ b/paper-toggle-button.html @@ -228,13 +228,10 @@ */ }, - listeners: { - track: '_ontrack' - }, - attached: function() { Polymer.RenderStatus.afterNextRender(this, function() { Polymer.Gestures.setTouchAction(this, 'pan-y'); + this.addEventListener('track', this._ontrack.bind(this)); }); },