From dcfe5dc30aac241dca9bdd0036d184d36150a6e2 Mon Sep 17 00:00:00 2001 From: Alquen Sarmiento Date: Thu, 7 May 2026 10:55:07 +0800 Subject: [PATCH] fix: remove the delay in enabling of links after dragging --- .../horizontal-scroller/frontend-horizontal-scroller.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/block/horizontal-scroller/frontend-horizontal-scroller.js b/src/block/horizontal-scroller/frontend-horizontal-scroller.js index fb2c2994c..7282c2f39 100644 --- a/src/block/horizontal-scroller/frontend-horizontal-scroller.js +++ b/src/block/horizontal-scroller/frontend-horizontal-scroller.js @@ -68,12 +68,13 @@ class StackableHorizontalScroller { behavior: 'smooth', } ) + children.forEach( child => { + // this enables the links after dragging + child.removeEventListener( 'click', onClickHandler, true ) + } ) + dragTimeout = setTimeout( () => { el.classList.remove( 'stk--snapping-deactivated' ) - children.forEach( child => { - // this enables the links after dragging - child.removeEventListener( 'click', onClickHandler, true ) - } ) }, 500 ) }