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

Selecting all text then typing a key other than space throws Uncaught RangeError: Position -1 out of range #2490

Closed
1 of 2 tasks
duhaime opened this issue Feb 6, 2022 · 4 comments
Labels
Type: Bug The issue or pullrequest is related to a bug

Comments

@duhaime
Copy link

duhaime commented Feb 6, 2022

What’s the bug you are facing?

If you navigate to e.g. the mention example, select all text, then type a character other than space, the editor throws:

vendor.248662a3.js:5 Uncaught RangeError: Position -1 out of range
    at Function.Xe.resolve (vendor.248662a3.js:5:37624)
    at Me.resolveNoCache (vendor.248662a3.js:5:41568)
    at Ax (vendor.248662a3.js:10:30536)
    at un.handleDOMChange (vendor.248662a3.js:13:9948)
    at un.flush (vendor.248662a3.js:13:7948)
    at MutationObserver.observer (vendor.248662a3.js:13:4965)

How can we reproduce the bug on our side?

please see above

Can you provide a CodeSandbox?

No response

What did you expect to happen?

I would expect no error to spring

Anything to add? (optional)

We're loving tiptap! This is fantastic work.

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. 💖
@duhaime duhaime added the Type: Bug The issue or pullrequest is related to a bug label Feb 6, 2022
@philippkuehn
Copy link
Contributor

Hmm, strange. I can’t reproduce this in any browser. Can you share a video of this issue?

@duhaime
Copy link
Author

duhaime commented Feb 6, 2022

@philippkuehn thanks for looking into this!

output

@philippkuehn
Copy link
Contributor

This was indeed a bug and I think this is a bug in ProseMirror itself. I pushed a workaround for now.

@devrudraa
Copy link

Hey @philippkuehn I am still facing this problem can you help me?

Versions:
TipTap Version: 2.5.1
Next.js: 14.2.3
React: 18.3.1

It works well in development but only after building does the project happen.

video:
https://github.com/user-attachments/assets/80c70dab-5b59-4c25-b3a6-a7ad5df33770

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

3 participants