From 2e99628a2a5bcacab1a3b0fc44e1df92e35e0fb1 Mon Sep 17 00:00:00 2001 From: Djamil Legato Date: Sat, 18 Apr 2015 13:48:13 -0700 Subject: [PATCH] Fixed swipe issue while scrolling and triggering the offcanvas opening when not intended --- assets/common/application/offcanvas/index.js | 4 ++-- assets/common/js/main.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/common/application/offcanvas/index.js b/assets/common/application/offcanvas/index.js index 8a2d825cb..76fc61c1b 100644 --- a/assets/common/application/offcanvas/index.js +++ b/assets/common/application/offcanvas/index.js @@ -121,7 +121,7 @@ var Offcanvas = new prime({ end: msPointerSupported ? 'MSPointerUp' : 'touchend' }; - this._scrollBound = decouple(this.bodyEl, 'scroll', this.bound('_bodyScroll')); + this._scrollBound = decouple(this.htmlEl, 'scroll', this.bound('_bodyScroll')); this.bodyEl.on(touch.move, this.bound('_bodyMove')); this.panel.on(touch.start, this.bound('_touchStart')); this.panel.on('touchcancel', this.bound('_touchCancel')); @@ -160,7 +160,7 @@ var Offcanvas = new prime({ end: msPointerSupported ? 'MSPointerUp' : 'touchend' }; - this.bodyEl[0].removeEventListener('scroll', this._scrollBound); + this.htmlEl[0].removeEventListener('scroll', this._scrollBound); this.bodyEl.off(touch.move, this.bound('_bodyMove')); this.panel.off(touch.start, this.bound('_touchStart')); this.panel.off('touchcancel', this.bound('_touchCancel')); diff --git a/assets/common/js/main.js b/assets/common/js/main.js index d0ec19495..0b3dc7247 100644 --- a/assets/common/js/main.js +++ b/assets/common/js/main.js @@ -391,7 +391,7 @@ var Offcanvas = new prime({ end: msPointerSupported ? 'MSPointerUp' : 'touchend' }; - this._scrollBound = decouple(this.bodyEl, 'scroll', this.bound('_bodyScroll')); + this._scrollBound = decouple(this.htmlEl, 'scroll', this.bound('_bodyScroll')); this.bodyEl.on(touch.move, this.bound('_bodyMove')); this.panel.on(touch.start, this.bound('_touchStart')); this.panel.on('touchcancel', this.bound('_touchCancel')); @@ -430,7 +430,7 @@ var Offcanvas = new prime({ end: msPointerSupported ? 'MSPointerUp' : 'touchend' }; - this.bodyEl[0].removeEventListener('scroll', this._scrollBound); + this.htmlEl[0].removeEventListener('scroll', this._scrollBound); this.bodyEl.off(touch.move, this.bound('_bodyMove')); this.panel.off(touch.start, this.bound('_touchStart')); this.panel.off('touchcancel', this.bound('_touchCancel'));