Skip to content

Commit

Permalink
List View: Fix stuck dragging mode in UI in Firefox when dealing with…
Browse files Browse the repository at this point in the history
… deeply nested lists (#60845)



Co-authored-by: andrewserong <[email protected]>
Co-authored-by: ramonjd <[email protected]>
Co-authored-by: diggeddy <[email protected]>
  • Loading branch information
4 people authored and creativecoder committed May 1, 2024
1 parent 78859b1 commit 06e9898
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -556,9 +556,14 @@ export default function useListViewDropZone( {
const ref = useDropZone( {
dropZoneElement,
onDrop( event ) {
throttled.cancel();
if ( target ) {
onBlockDrop( event );
}
// Use `undefined` value to indicate that the drag has concluded.
// This allows styling rules that are active only when a user is
// dragging to be removed.
setTarget( undefined );
},
onDragLeave() {
throttled.cancel();
Expand Down

0 comments on commit 06e9898

Please sign in to comment.