Skip to content

Commit

Permalink
Writing flow: don't prepare for multi selection when dragging inwards (
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix authored Feb 1, 2024
1 parent afa8b5c commit 0e75767
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@ export default function useDragSelection() {
} );
}

function onMouseLeave( { buttons, target } ) {
function onMouseLeave( { buttons, target, relatedTarget } ) {
// If we're moving into a child element, ignore. We're tracking
// the mouse leaving the element to a parent, no a child.
if ( target.contains( relatedTarget ) ) {
return;
}

// Avoid triggering a multi-selection if the user is already
// dragging blocks.
if ( isDraggingBlocks() ) {
Expand Down

0 comments on commit 0e75767

Please sign in to comment.