Skip to content

Conversation

@vincentdchan
Copy link

The problem

This PR is trying to fix the issue of IME in quill editor: slab/quill#4449

We found that if we want to fix the collaborative editing issue, we need to disable batchStart and batchEnd in the handlers.

https://github.com/slab/quill/blob/b213e1073bac1478649f26e3c0dad50ad0eb2a49/packages/quill/src/core/composition.ts#L42

Afterward, we found that the first letter from the IME input remains when typing on an empty line.

2024-10-15 21 13 21

This PR fixes this issue.

Root cause

We found that this is caused by Quill re-inserting the child element into the parent, even when the element is already in the correct position, which causes the browser to cancel the composition.

The solution

Looking at the diff code, I’m not sure why it was written that way originally. However, it seems there is an issue with the logic, and I have made corrections here. After the correction, the above-mentioned issue is resolved

Copy link

@Gowtham-Muthupandian Gowtham-Muthupandian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA Approved!

work-2025 pushed a commit to work-2025/parchment that referenced this pull request Apr 3, 2025
work-2025 pushed a commit to work-2025/parchment that referenced this pull request Apr 3, 2025
work-2025 pushed a commit to work-2025/parchment that referenced this pull request Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants