In an Angular environment, an unremovable empty line appears when leaving IME mode.
In an Angular, when inputting Chinese, an unremovable empty line appears when leaving IME mode at the beginning of each line.
I'm sorry for reposting the issue. After several days of research, I found that it is not related to ngx-quill. Even when directly referencing QuillJS within Angular, the same behavior occurs. I've also tested it on a brand new Mac computer with the Sonoma operating system, and the issue persists.
Steps for Reproduction
- Visit https://stackblitz.com/edit/angular-17-starter-project-e9hbuq?file=src%2Fmain.ts
- Move to start of line.
- Enter IME mode
- backspace to leave IME
- Unremovable line appears
Actual behavior: https://github.com/quilljs/quill/assets/44791594/aaccfa7f-6618-45bc-a331-c096a59b5890
Platforms: angular 17, Sonoma 14.3, Chrome 123.0.6312.58 and Safari 17.3 has same behavior
Version: v2.0.0-rc.4
Thanks for the details! Can you reproduce it when running without Angular?
I was able to reproduce the issue successfully without Angular, which I hope is helpful.
https://stackblitz.com/edit/stackblitz-starters-pntnad?file=index.html
I found the problem, but I don't know the reason. After commenting out this section in polyfills.js, everything works fine.
I temporarily fixed the issue; we need to unpatch compositionend from zone.js.
Something could be related: https://github.com/quilljs/quill/pull/3972. The PR fixed a similar issue for Safari where the cause was the timing of compositionend is different in Safari.