Open vincentdchan opened 2 years ago
Hi @vincentdchan, thank you for this!
I'm wondering how this workaround behaves in a collaborative environment. I expect that remote changes will delete the composing state which is probably worse than committing the composing state.
Would it be possible for you to test if this works reliably when other people are editing the same document / paragraph?
I have create a project with y-prosemirror. It use vincentdchan:feat/ime branch.
It has some problem. While delete a some content. The user is under composing, cursor comes wrong.
I have check the shimo's behavior. During composing, It much like a offline editor.
cursor data received by another user
😀I have implement a custom provider based on socket.io. While composing, I make sync suspense. Just like disconnect. After composing, I send a sync message. It works fine. You can check the demo at http://43.134.196.209:3000/cl7a7opuy0028drwid01c38vf
😔I tried modify the demo in y-prosemirror, but the disconnect action in y-webrtc provider not works fine.
Why?
When the user inputs with IME, the middle process will be committed, that's unnecessary. This PR wants to optimize this behaviour. When the editor is in the composing state, Yjs don't need to commit the changes. When the composition was finished, the plugin commits the changes.
Before
After