You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, when two or more users are typing and adding new lines/pressing Enter key, it can lead to cursor misplacement/shift off by one, two, etc, positions.
You can replicate this by having two people on this example, one writing forward without entering new lines, and another writing and adding a few new lines. This doesn't occur on the first new line attempts, but after a solid half-dozen or more new lines/enter keypresses by the second person.
Also needs more testing/debugging.
The text was updated successfully, but these errors were encountered:
Just added something that can alleviate this issue, added a mechanism that forces a cursor update some time after the user stops typing (and it's debounced): af81b13
It's not ideal, and it's a fix, but it helps the cursor position to heal/re-sync when its position becomes 'dirty'.
@pedrosanta I've noticed the debounce timeout is 1500, but it updates much quicker and works better with lower debounce time, like 100ms. Why did you choose 1500 as the debounce timeout?
@pedrosanta I have also noticed in my console that I get the console.log('Troubles!', cursor) statement reached quite often. But it still appears that the cursor works just fine... Why is this?
@pedrosanta I have also noticed in my console that I get the console.log('Troubles!', cursor) statement reached quite often. But it still appears that the cursor works just fine... Why is this?
That's something I'm still checking out. I have since improved that overly generic logging to a more sensible console.warn. But, I've managed to catch a case or two when that happens – check reedsy/quill-cursors#8.
Sometimes, when two or more users are typing and adding new lines/pressing Enter key, it can lead to cursor misplacement/shift off by one, two, etc, positions.
You can replicate this by having two people on this example, one writing forward without entering new lines, and another writing and adding a few new lines. This doesn't occur on the first new line attempts, but after a solid half-dozen or more new lines/enter keypresses by the second person.
Also needs more testing/debugging.
The text was updated successfully, but these errors were encountered: