diff --git a/assets/js/theme/blocks/draggableBlocks.js b/assets/js/theme/blocks/draggableBlocks.js index 86281326bf83ca2404c5874085c5ac69b51a0f96..661ad5ce4b483e5b15a4182d60e8ee816b28f6d5 100644 --- a/assets/js/theme/blocks/draggableBlocks.js +++ b/assets/js/theme/blocks/draggableBlocks.js @@ -98,13 +98,16 @@ class DraggableBlock { handleScroll() { this.content.addEventListener('wheel', (event) => { - const delta = event.deltaX; - - if (delta !== 0) { - if (delta > 0) { - this.goTo(this.index+1); - } else { - this.goTo(this.index-1); + const deltaX = event.deltaX; + const deltaY = event.deltaY; + + if (Math.abs(deltaX) > Math.abs(deltaY)) { + if (deltaX !== 0) { + if (deltaX > 0) { + this.goTo(this.index + 1); + } else { + this.goTo(this.index - 1); + } } } });