From 3da5b437d9d7272e07e568b7cab327806416c2a3 Mon Sep 17 00:00:00 2001 From: Yuriy Yevstihnyeyev Date: Wed, 20 Sep 2017 16:03:48 +0300 Subject: [PATCH 1/2] Add back the import of Polymer.GestureEventListeners --- vaadin-button.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vaadin-button.html b/vaadin-button.html index 9b098fa..81eab42 100644 --- a/vaadin-button.html +++ b/vaadin-button.html @@ -5,6 +5,7 @@ --> + @@ -70,9 +71,10 @@ * @memberof Vaadin * @mixes Vaadin.ControlStateMixin * @mixes Vaadin.ThemableMixin + * @mixes Polymer.GestureEventListeners * @demo demo/index.html */ - class ButtonElement extends Vaadin.ControlStateMixin(Vaadin.ThemableMixin(Polymer.Element)) { + class ButtonElement extends Vaadin.ControlStateMixin(Vaadin.ThemableMixin(Polymer.GestureEventListeners(Polymer.Element))) { static get is() { return 'vaadin-button'; } From bace62265ecf8178ab10bac9779deb84a663e204 Mon Sep 17 00:00:00 2001 From: Yuriy Yevstihnyeyev Date: Wed, 20 Sep 2017 16:11:10 +0300 Subject: [PATCH 2/2] Get rid of old API --- vaadin-button.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vaadin-button.html b/vaadin-button.html index 81eab42..f8d246c 100644 --- a/vaadin-button.html +++ b/vaadin-button.html @@ -93,8 +93,8 @@ } _addActiveListeners() { - this._addEventListenerToNode(this, 'down', () => !this.disabled && this.setAttribute('active', '')); - this._addEventListenerToNode(this, 'up', () => this.removeAttribute('active')); + Polymer.Gestures.addListener(this, 'down', () => !this.disabled && this.setAttribute('active', '')); + Polymer.Gestures.addListener(this, 'up', () => this.removeAttribute('active')); this.addEventListener('keydown', e => !this.disabled && [13, 32].indexOf(e.keyCode) >= 0 && this.setAttribute('active', '')); this.addEventListener('keyup', () => this.removeAttribute('active')); }