y-prosemirror icon indicating copy to clipboard operation
y-prosemirror copied to clipboard

Fix `binding === null` due to asynchronous creation. Fixes #42

Open whawker opened this issue 4 years ago • 3 comments

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.

whawker avatar Jun 18 '21 18:06 whawker

@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?

ronnyroeller avatar Jul 01 '21 07:07 ronnyroeller

@dmonad Any chance you could take a look over this?

whawker avatar Aug 31 '21 15:08 whawker

Can also confirm that this fixes an issue related to the binding null I was having.

flaviouk avatar Sep 12 '21 21:09 flaviouk