Skip to content

Conversation

matthewlipski
Copy link
Collaborator

Dropping dragged blocks inside a React custom block may fail to actually fire a drop event. It seems like this is because they aren't seen as valid drop targets, so this PR makes them valid drop targets by adding the dragover listener.

The easiest way to see this is with the alert block example. Try dragging a block from below it and dropping it on the alert type icon, so that the drop indicator is above the alert. The drop won't fire and the dragged block will return to its original position.

This doesn't seem to be necessary for vanilla JS custom blocks.

Copy link

vercel bot commented Mar 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Mar 7, 2025 3:43pm
blocknote-website ✅ Ready (Inspect) Visit Preview Mar 7, 2025 3:43pm

@matthewlipski matthewlipski merged commit 6064fa0 into main Mar 10, 2025
7 checks passed
@matthewlipski matthewlipski deleted the react-custom-block-drop-fix branch March 10, 2025 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant