Skip to content
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

cursor jumping to line start when using IME #362

Open
dizys opened this issue Aug 12, 2022 · 1 comment
Open

cursor jumping to line start when using IME #362

dizys opened this issue Aug 12, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@dizys
Copy link

dizys commented Aug 12, 2022

What is an IME?

IMEs are used to type non-latin languages (such as many Asian languages) with latin (QWERTY) keyboard.

Current behavior

While UserA is in the middle of typing with IME, UserB insert characters at the same line. The cursor of UserA will jump to line start when it receives changes from UserB.

yjs-slate-with-ime

Expected behavior

Cursor of UserA should stay where UserA was trying to insert.

Environment

Reproduced on: demo site
MacOS: 12.4
Chrome: 104.0.5112.81 (arm64)

@BitPhinix
Copy link
Owner

It's more of a slate issue, tbh. The issue is that the remote change is causing the node to re-render, but slate doesn't update/re-set the user selection so it ends up at the start of the node. One solution would be to no apply remote changes while the user is composing 🤔

@BitPhinix BitPhinix added the enhancement New feature or request label Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants