Drag and drop does not work correctly with horizontal block lists #22662
Labels
[Feature] Drag and Drop
Drag and drop functionality when working with blocks
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Describe the bug
This is something that I only discovered by looking at the code, but Drag and Drop only works correctly with vertical block lists.
The
useBlockDropZone
hook only uses they
position for determining the drop position:https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/use-block-drop-zone/index.js#L184-L206.
Often the block ends up in the wrong place and the drop zone is highlighted incorrectly.
Seems like this was probably an accidental oversight when introducing horizontal block lists.
To reproduce
Steps to reproduce the behavior:
Expected behavior
Drag and dropping works consistently in horizontal block lists:
The text was updated successfully, but these errors were encountered: