From 8ec2847ff54e14c67c1c3b22050bbda57f668aab Mon Sep 17 00:00:00 2001 From: joelterry Date: Mon, 28 Jan 2019 20:15:13 -0800 Subject: [PATCH] Mobile scrolling fix Don't trigger the mobile menu when scrolling horizontally on, for example, a code block. --- public/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app.js b/public/app.js index 27dac368..1d58f4af 100644 --- a/public/app.js +++ b/public/app.js @@ -188,7 +188,7 @@ Slideout.prototype._initTouchEvents = function() { */ this.panel.addEventListener(touch.move, function(eve) { - if (scrolling || self._preventOpen) { return; } + if (scrolling || self._preventOpen || eve.target.scrollWidth > window.innerWidth) { return; } var dif_x = eve.touches[0].clientX - self._startOffsetX; var translateX = self._currentOffsetX = dif_x;