Skip to content

Commit 2369cb2

Browse files
committed
fix: force browser to recompute the grid
1 parent 7ffd155 commit 2369cb2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/block/horizontal-scroller/frontend-horizontal-scroller.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ class StackableHorizontalScroller {
9494
el.addEventListener( 'mousedown', mouseDownHandler )
9595

9696
el._StackableHasInitHorizontalScroller = true
97+
98+
// Fixes grid rendering issues by toggling the gridAutoFlow property
99+
requestAnimationFrame( () => {
100+
el.style.gridAutoFlow = 'row'
101+
requestAnimationFrame( () => {
102+
el.style.gridAutoFlow = 'column'
103+
} )
104+
} )
97105
} )
98106
}
99107
}

0 commit comments

Comments
 (0)