Skip to content

fix: Isolated drag/drop per editor instance #174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 20, 2023

Conversation

matthewlipski
Copy link
Collaborator

Previously, drag/drop was broken with multiple side-by-side editor instances, as dropping blocks outside the editor in the x dimension was coded to instead drop them at the editor's center x coord. This meant that whichever editor's drop listener fired first would receive the block. Now, each editor instance only listens for drag/drop events if the content in them came from that same editor instance. The drop cursor has also been modified to work in this way.

Closes #173

@vercel
Copy link

vercel bot commented Apr 19, 2023

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

Name Status Preview Comments Updated (UTC)
blocknote-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 19, 2023 7:49pm

@matthewlipski matthewlipski merged commit a74def2 into main Apr 20, 2023
fogle pushed a commit to fogle/BlockNote that referenced this pull request May 20, 2023
* Made dragging & dropping confined to the editor instance

* Reverted drop cursor fix

* Minor change

* Fixed build error
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.

Rendering multiple editor on a page causes unexpected behavior on drag and drop.
1 participant