yjs / y-quill

Quill Editor binding for Yjs
https://demos.yjs.dev/quill/quill.html
MIT License
80 stars 18 forks source link

weird collaborator's cursor behavior #1

Open crapthings opened 4 years ago

crapthings commented 4 years ago

https://streamable.com/hy8xf

its not sync

and the other user's cursor always on start of text

crapthings commented 4 years ago

https://github.com/y-js/y-quill/blob/master/src/y-quill.js#L42

image

const anchor = Y.createAbsolutePositionFromRelativePosition(Y.createRelativePositionFromJSON(aw.cursor.anchor), doc)
const head = Y.createAbsolutePositionFromRelativePosition(Y.createRelativePositionFromJSON(aw.cursor.head), doc)

collaborator's cursor index is always 0