Fixed swipe issue while scrolling and triggering the offcanvas opening when not intended

This commit is contained in:
Djamil Legato
2015-04-18 13:48:13 -07:00
parent f1f4eadd53
commit 2e99628a2a
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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'));
+2 -2
View File
@@ -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'));