diff --git a/app-drawer/app-drawer.html b/app-drawer/app-drawer.html index 6542e3e6..de392a39 100644 --- a/app-drawer/app-drawer.html +++ b/app-drawer/app-drawer.html @@ -251,9 +251,6 @@ _lastTabStop: null, ready: function() { - // Set the scroll direction so you can vertically scroll inside the drawer. - this.setScrollDirection('y'); - // Only transition the drawer after its first render (e.g. app-drawer-layout // may need to set the initial opened state which should not be transitioned). this._setTransitionDuration('0s'); @@ -267,9 +264,12 @@ this._boundEscKeydownHandler = this._escKeydownHandler.bind(this); this._resetDrawerState(); - this.listen(this, 'track', '_track'); this.addEventListener('transitionend', this._transitionend.bind(this)); this.addEventListener('keydown', this._tabKeydownHandler.bind(this)) + + // Only listen for horizontal track so you can vertically scroll inside the drawer. + this.listen(this, 'track', '_track'); + this.setScrollDirection('y'); }); }, diff --git a/app-drawer/test/app-drawer.html b/app-drawer/test/app-drawer.html index 09b30614..94f05f5a 100644 --- a/app-drawer/test/app-drawer.html +++ b/app-drawer/test/app-drawer.html @@ -116,8 +116,11 @@ assert.isFalse(drawer.noFocusTrap); }); - test('set scroll direction', function() { - assert.equal(drawer['__polymerGesturesTouchAction'], 'pan-y'); + test('set scroll direction', function(done) { + window.setTimeout(function() { + assert.equal(drawer['__polymerGesturesTouchAction'], 'pan-y'); + done(); + }, 350); }); test('transitions are enabled after attached', function(done) {