y-prosemirror
y-prosemirror copied to clipboard
Fix `binding === null` due to asynchronous creation. Fixes #42
This PR fixes an issue with the sync plugin where binding === null leading to issues when calculated relative/absolute positions.
Previously binding was set via an asynchronous transaction (using setTimeout) - anything that occurred before the execution of the callback could error.
This PR changes the sync plugin to PluginState pattern (see here) and uses an init method to pass the view and create the binding.
@dmonad We're relying on this fix (currently running on a fork of y-prosemirror). Is there a chance to get this PR merged into master?
@dmonad Any chance you could take a look over this?
Can also confirm that this fixes an issue related to the binding null I was having.