Skip to content
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

BubbleMenu - RangeError when removing content #2112

Closed
2 tasks done
pimmee opened this issue Oct 31, 2021 · 0 comments
Closed
2 tasks done

BubbleMenu - RangeError when removing content #2112

pimmee opened this issue Oct 31, 2021 · 0 comments
Labels
Type: Bug The issue or pullrequest is related to a bug

Comments

@pimmee
Copy link

pimmee commented Oct 31, 2021

What’s the bug you are facing?

The editor gets a RangeError and crashes when using the BubbleMenu and CTRL+A deleting long content.

image

How can we reproduce the bug on our side?

  1. Go to https://tiptap.dev/examples/menus
  2. Paste some long content (e.g. this template google doc)
  3. Try to delete with CTRL+A

Can you provide a CodeSandbox?

No response

What did you expect to happen?

The BubbleMenu to send the correct position to prosemirror-model / update doc content size properly

Anything to add? (optional)

The error is related to prosemirror-model, and I submitted a PR that solves the issue, but it was closed with this justification:

These methods expect the caller to provide a valid position, and I'm not willing to change that, since this'll just end up hiding bugs. The asynchronous code in the bubble menu should take care to either map its position along with document changes, or bail out and retry if the document changed.

Did you update your dependencies?

  • Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • Yes, I’m a sponsor. 💖
@pimmee pimmee added the Type: Bug The issue or pullrequest is related to a bug label Oct 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug The issue or pullrequest is related to a bug
Projects
None yet
Development

No branches or pull requests

1 participant