-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
TextSelection warning from prosemirror-state 1.4.0 #2846
Comments
Just saying: the #2854 PR (chore: migrate to new versions of prosemirror packages) did not fix the problem described above. |
I'll investigate this issue when I find some time, thanks for bringing it up |
Can you reproduce this issue in the browser? It's not a test but I tried to replicate that warning in this sandbox: I can't see any comparable warning message - no matter if the editor has initial content or not. As far as I understood this is a warning that was introduced in prosemirror-state 1.4.0. |
Sure, @bdbch. Thank you for your time~ I've modified my minimal repo a bit. Now the warning should appear in the browser console. https://stackblitz.com/github/andy1li/text-selection-test-warning?file=src%2Fmain.ts Perhaps it's because my use case is not very typical: On my backend, tiptap is used in a normal fashion to do some custom markups. On my frontend, tiptap is used (without attaching |
What’s the bug you are facing?
Tiptap (or more precisely, prosemirror-state 1.4.0) throws out a warning in my tests, when using tiptap's
editor.commands.setContent()
:TextSelection endpoint not pointing into a node with inline content (doc)
Which browser was this experienced in? Are any special extensions installed?
It's not in the browser, but in the
happy-dom
environment ofvitest
.How can we reproduce the bug on our side?
I made this minimal repo:
https://github.com/andy1li/text-selection-test-warning
npm run test
Can you provide a CodeSandbox?
https://stackblitz.com/github/andy1li/text-selection-test-warning
What did you expect to happen?
No TextSelection warning should appear. Can we do something in tiptap to make it go away?
Anything to add? (optional)
The warning seems to be from
checkTextSelection()
in prosemirror-state 1.4.0 (released at the end of May):https://github.com/ProseMirror/prosemirror-state/blob/f1c2ff98a397aa05b9ccf5ee23642bb7e44f05a7/src/selection.ts#L221
It seems that prosemirror-state 1.3.4 from more than a year ago does not have the new
checkTextSelection()
function.Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: