-
-
Notifications
You must be signed in to change notification settings - Fork 125
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
Scroll position changes when other clients are editing #31
Comments
I can't reproduce this issue in The code you mentioned scrolls the window to the current editing position when a remote change happens IF the cursor is currently in view. This prevents weird scrolling behavior when a user is adding/removing a lot of content at the beginning of the document. |
In which case the "if cursor is in view" logic must not be correct 🤔 |
Apparantly. But your comment doesn't help me to fix the problem. As said, I can't reproduce the issue using the description you gave me. |
I think the key is to scroll up without clicking anywhere outside of the editor in the first window. Probably easiest to reproduce with two machines as this is how it was first found in testing. Some more debugging, when it reaches |
That is intended. Maybe the check fails because In your environment, is that different from |
Totally agreed, that information wasn't requested in the template previously though and I thought it would be relatively clear in the gif that it's Chrome on macOS. |
This is fixed in y-prosemirror@1.0.5 |
Includes fixes for scrolling while remote clients are editing and incorrect remote selections see: yjs/y-prosemirror#31 see: yjs/y-prosemirror#32
To Reproduce
Screencast
From the
y-prosemirror
demo site:I tracked it down to this line – could you enlighten in which circumstances this is supposed to trigger? It feels like it would be fine if remote edits never caused the local scroll state to change.
y-prosemirror/src/plugins/sync-plugin.js
Lines 344 to 346 in 52116dd
The text was updated successfully, but these errors were encountered: