Tiles jumps to next line when Compaction Type is Horizontal
Author: sBouzolsCreated Jul 8, 2025Updated Aug 4, 2026
Labelsbugready-for-human
Describe the bug
see in https://react-grid-layout.github.io/react-grid-layout/examples/00-showcase.html
In horizontal compaction type, when dragging a tile all over the grid, some tiles just jump to the next line and then at the end of the grid. It doesn't happen with vertical compaction type.
Your Example Website or App
https://react-grid-layout.github.io/react-grid-layout/examples/00-showcase.html
Steps to Reproduce the Bug or Issue
- Got to https://react-grid-layout.github.io/react-grid-layout/examples/00-showcase.html
- set Compaction type: Horizontal
- Drag (without drop) a tile over another tile (
Expected behavior
As for vertical compaction type, tiles don't change their column when dragging another tile over it.
react-grid-layout library version
latest : 1.5.2
Operating System Version
- Ubuntu
Browser
Firefox
Additional context
No response
Screenshots or Videos
No response
Source: react-grid-layout/react-grid-layout