Skip to content

Drag handling runtime error when block is dragged outside editor #1444

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

Closed
1 task
nicholasdavidbrown opened this issue Feb 19, 2025 · 2 comments · Fixed by #1458
Closed
1 task

Drag handling runtime error when block is dragged outside editor #1444

nicholasdavidbrown opened this issue Feb 19, 2025 · 2 comments · Fixed by #1458
Assignees
Labels
bug Something isn't working

Comments

@nicholasdavidbrown
Copy link

Describe the bug
The blocknote editor experiences a runtime error when a block is dragged outside the editor frame or a drag doesn't fire the end event.

Error: New drag was started while an existing drag is ongoing

This is happening on a multi-editor page. I think there just needs to be some logic to close the drag event if it fails to land in a valid space.
You may already be aware of this.

To Reproduce
You can try it here with the latest release

(https://stackblitz.com/github/TypeCellOS/BlockNote/tree/main/examples/01-basic/01-minimal?file=App.tsx)>

Open up the console and drag a block into some middle space between editors here , anything that gives a cancel icon on drag

Image

Image

Browser showing runtime error -

Image

Misc

  • Node version:
  • Package manager:
  • Browser:
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖

Thanks for creating such a great library!

@nicholasdavidbrown nicholasdavidbrown added the bug Something isn't working label Feb 19, 2025
@nicholasdavidbrown nicholasdavidbrown changed the title Drag handling runtime error when block is dragged outside editor (e Drag handling runtime error when block is dragged outside editor Feb 19, 2025
@devtestersweden
Copy link

devtestersweden commented Feb 21, 2025

+1 for this, makes my custom blocks almost undraggable.

@YousefED
Copy link
Collaborator

I was able to reproduce this also on the latest version, we'll look into this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants