From 51b82535b71f7fcc9aa8a8af9dce145163b4682c Mon Sep 17 00:00:00 2001 From: Christopher Date: Sat, 30 Oct 2021 09:59:22 +0200 Subject: [PATCH] Fix direction reporting when dragging scroll bar See my bug report here: https://github.com/locomotivemtl/locomotive-scroll/issues/362 --- src/scripts/Smooth.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/scripts/Smooth.js b/src/scripts/Smooth.js index 763ed017..d35cf252 100644 --- a/src/scripts/Smooth.js +++ b/src/scripts/Smooth.js @@ -360,9 +360,7 @@ export default class extends Core { if (this.instance.direction !== 'up') { this.instance.direction = 'up'; } - } - - if (this.instance.delta.x > this.instance.scroll.x) { + } else if (this.instance.delta.x > this.instance.scroll.x) { if (this.instance.direction !== 'right') { this.instance.direction = 'right'; }