Skip to content

Commit

Permalink
[mini] drag and drop: fix misplaced drop indicator (WordPress#67434)
Browse files Browse the repository at this point in the history
Co-authored-by: ellatrix <[email protected]>
Co-authored-by: youknowriad <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: ntsekouras <[email protected]>
  • Loading branch information
5 people authored Dec 2, 2024
1 parent 39a4d1c commit 340d617
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ function BlockPopoverInbetween( {
? nextRect.left - previousRect.right
: 0;
}

// Avoid a negative width which happens when the next rect
// is on the next line.
width = Math.max( width, 0 );
}

return new window.DOMRect( left, top, width, height );
Expand Down

0 comments on commit 340d617

Please sign in to comment.