From 2369cb28855988dc5bce7267c8d0efb639663035 Mon Sep 17 00:00:00 2001 From: Alquen Sarmiento Date: Mon, 12 Jan 2026 16:41:57 +0800 Subject: [PATCH] fix: force browser to recompute the grid --- .../horizontal-scroller/frontend-horizontal-scroller.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/block/horizontal-scroller/frontend-horizontal-scroller.js b/src/block/horizontal-scroller/frontend-horizontal-scroller.js index 28dec41d33..22d8e5a03e 100644 --- a/src/block/horizontal-scroller/frontend-horizontal-scroller.js +++ b/src/block/horizontal-scroller/frontend-horizontal-scroller.js @@ -94,6 +94,14 @@ class StackableHorizontalScroller { el.addEventListener( 'mousedown', mouseDownHandler ) el._StackableHasInitHorizontalScroller = true + + // Fixes grid rendering issues by toggling the gridAutoFlow property + requestAnimationFrame( () => { + el.style.gridAutoFlow = 'row' + requestAnimationFrame( () => { + el.style.gridAutoFlow = 'column' + } ) + } ) } ) } }