Skip to content

Commit 0e75767

Browse files
authored
Writing flow: don't prepare for multi selection when dragging inwards (#58552)
1 parent afa8b5c commit 0e75767

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/block-editor/src/components/writing-flow/use-drag-selection.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,13 @@ export default function useDragSelection() {
7575
} );
7676
}
7777

78-
function onMouseLeave( { buttons, target } ) {
78+
function onMouseLeave( { buttons, target, relatedTarget } ) {
79+
// If we're moving into a child element, ignore. We're tracking
80+
// the mouse leaving the element to a parent, no a child.
81+
if ( target.contains( relatedTarget ) ) {
82+
return;
83+
}
84+
7985
// Avoid triggering a multi-selection if the user is already
8086
// dragging blocks.
8187
if ( isDraggingBlocks() ) {

0 commit comments

Comments
 (0)