From ba95f432e2a56426f9da453422c050b16473d09a Mon Sep 17 00:00:00 2001 From: Keanu Lee Date: Tue, 16 Feb 2016 17:24:37 -0800 Subject: [PATCH] remove scrim tap debouncer --- app-drawer/app-drawer.html | 12 ++---------- app-drawer/test/app-drawer.html | 12 ------------ 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/app-drawer/app-drawer.html b/app-drawer/app-drawer.html index 4a6912f4..d7bfc25e 100644 --- a/app-drawer/app-drawer.html +++ b/app-drawer/app-drawer.html @@ -260,14 +260,9 @@ }, _scrimTapHandler: function() { - if (this.persistent) { - return; - } - - // This debouncer is needed because of Polymer/polymer#3405. - this.debounce('_scrimTapHandler', function() { + if (!this.persistent) { this.opened = false; - }, 1); + } }, _track: function(event) { @@ -313,9 +308,6 @@ }, _trackEnd: function(event) { - // Track handler takes precedence over scrim tap handler. See Polymer/polymer#3405. - this.cancelDebouncer('_scrimTapHandler'); - // Calculate the velocity. this._velocity = this._calculateVelocity(event); diff --git a/app-drawer/test/app-drawer.html b/app-drawer/test/app-drawer.html index cdc3509e..7216b336 100644 --- a/app-drawer/test/app-drawer.html +++ b/app-drawer/test/app-drawer.html @@ -141,18 +141,6 @@ assert.isTrue(ev.defaultPrevented); }); - test('track events block scrim tap', function(done) { - drawer.opened = true; - drawer.fire('track', { state: 'start' }); - drawer.fire('tap', null /* detail */, { node: scrim }); - drawer.fire('track', { state: 'end', dx: 0, ddx: 0 }); - - window.setTimeout(function() { - assert.isTrue(drawer.opened); - done(); - }, 1); - }); - test('styles reset after swiping', function() { drawer.fire('track', { state: 'start' });