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

Fixed _root.createRange() which errors when used in HTML5 shadow root. #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WillBux
Copy link

@WillBux WillBux commented Jul 1, 2021

The _root.createRange() on line 235 of sync-plugin.js causes errors when ProseMirror is used within a Shadow Root, because the function does not exist:
Caught error while handling a Yjs update TypeError: this.prosemirrorView._root.createRange is not a function

This pull request uses the new Range() constructor which does not error.

@WillBux WillBux changed the title _root.createRange() errors when used in HTML5 shadow root. Fixed _root.createRange() which errors when used in HTML5 shadow root. Jul 1, 2021
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.

1 participant