Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Nov 26, 2024
1 parent daa7f35 commit 6897d91
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ const InserterDraggableBlocks = ( {
startDragging();
for ( const block of draggableBlocks ) {
const type = `wp-block:${ block.name }`;
// This will fill in the dataTransfer.types array so that
// the drop zone can check if the draggable is eligible.
// Unfortuantely, on drag start, we don't have access to the
// actual data, only the data keys/types.
event.dataTransfer.items.add( '', type );
}
} }
Expand Down

0 comments on commit 6897d91

Please sign in to comment.