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

Content synchronization error when co-editing with Korean IME. #17

Open
2 of 4 tasks
weiQuill opened this issue Aug 28, 2024 · 4 comments
Open
2 of 4 tasks

Content synchronization error when co-editing with Korean IME. #17

weiQuill opened this issue Aug 28, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@weiQuill
Copy link

weiQuill commented Aug 28, 2024

Please save me some time and use the following template. In 90% of all issues I can't reproduce the problem because I don't know what exactly you are doing, in which environment, or which y-* version is responsible. Just use the following template even if you think the problem is obvious.

Checklist

Describe the bug
I ran the y-quill demo locally and opened two windows to simulate different clients. When I used Korean IME to quickly type in one of the windows, and then clicked on a line in the other window and tried to continue typing there, the error occurred.

The strange thing is that I can't reproduce this issue in the online demo.

Since y-webrt didn’t work for me, I just replaced it with y-websocket. Same as the online demo.
QQ_1724830583941

To Reproduce
Steps to reproduce the behavior:

  1. Run y-quill demo locally.
  2. Open the demo in 2 windows.
  3. Switch to a Korean IME, I used 3-Set Korean.
  4. Create some empty lines in the editor.
  5. Focus into the first line of the editor in window A.
  6. Press and hold T key.
  7. Click into another line of the editor in window B.
  8. Content synchronization error, the content on both sides is different.

Expected behavior
The content is synced correctly.

Screenshots

Screen.Recording.2024-08-28.at.15.24.59.mov

Environment Information

  • Browser / Node.js [e.g. Chrome, Firefox, Node.js]
  • Yjs version and the versions of the y-* modules you are using [e.g. yjs v13.0.1, y-webrtc v1.2.1]. Use npm ls yjs to find out the exact version you are using.

Additional context
BTW, this is also an issue that occurs when using Korean IME in my project, which is also a combination of quill+yjs.

  • I'm a sponsor 💖
  • This issue is a blocker for my project.
@weiQuill weiQuill added the bug Something isn't working label Aug 28, 2024
@weiQuill
Copy link
Author

@ViniciusSCG Thanks for your quick reply, can you explain it more clearly?

@dmonad
Copy link
Member

dmonad commented Aug 28, 2024

Hi @weiQuill

The last comment was a phishing attack by a random user. I hope you didn't download anything.

These kinds of issues are extremely hard to debug for me. Are you saying that the demo (https://demos.yjs.dev/quill/quill.html) is working but the demo in this repository (npm run demo) is not?

If that's the case, then this might be an issue with the quill editor version.

To verify events that we receive from the quill editor, could you modify the source-code of y-quill and add this logging statement?

   // line 104
    this._quillObserver = (eventType, delta, state, origin) => {
      console.log({ eventType, delta, state, origin }) // <--- add this line
     ...

It would really help me understand the problem. Thanks!

@weiQuill
Copy link
Author

Yes, I didn't download those files, I was wary of downloading files, thanks for the heads up!

These kinds of issues are extremely hard to debug for me. Are you saying that the demo (demos.yjs.dev/quill/quill.html) is working but the demo in this repository (npm run demo) is not?

Yes, I just run the demo on my local with npm run start, and noticed the issue when testing.
Then I try to reproduce the issue the online demo(demos.yjs.dev/quill/quill.html), but it works fine there.

Thanks for pointing me in that direction, I'll give it a try!

@github-staff github-staff deleted a comment from ViniciusSCG Oct 1, 2024
@jimei416
Copy link

jimei416 commented Oct 12, 2024

HI @dmonad
I also encountered the same problem when using Chinese for collaborative editing.
There were no errors when running the demo locally at first. But after changing the default version to the latest version
image
Entering Chinese characters will result in errors like @weiQuill . But if you enter English characters, there will be no problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants
@dmonad @weiQuill @jimei416 and others