yjs / y-prosemirror

ProseMirror editor binding for Yjs
https://demos.yjs.dev/prosemirror/prosemirror.html
MIT License
346 stars 120 forks source link

On long docs the editor can scroll for other collab users #14

Closed vwall closed 4 years ago

vwall commented 4 years ago

We ran into a problem in a long doc and a user outside of the view port. The user will get scrolled when someone starts typing. Just checked the demo site https://yjs.dev/ and it also has this issue.

vwall commented 4 years ago

@dmonad I was able to remove this issue by deleting this line. Does this seem like a reasonable fix?

https://github.com/yjs/y-prosemirror/blob/master/src/plugins/sync-plugin.js#L320

dmonad commented 4 years ago

@vwall Yes, this fix makes more sense than the current solution. The idea was that the editor content automatically adapts the window location when another user changes content. Unfortunately, this is not yet fully worked out.

vwall commented 4 years ago

Would you accept a pull-request that maybe just comments that part out for now? We had to recreate the sync-plugin to avoid this issue.

dmonad commented 4 years ago

Sure

dmonad commented 4 years ago

@boschDev is currently working on this #18

dmonad commented 4 years ago

Fixed in 0.3.7