quill
quill copied to clipboard
Placeholder text not removing until space is pressed (quill version 2 0.0-rc.2) in mobile browsers (chrome, firefox)
I don't see an issue with Chrome 122 on Android. The placeholder is removed after I input any char or space. Please fill all the info requested in the issue template.
@benbro My chrome version is 121.0.6167.178
Another thing that may be related to this issue.
I've noticed that while typing with predictive text through an IME (tested on Gboard & Samsung Keyboard), Quill doesn't register the underlined word (handled by the predictive text). Instead, Quill waits until the predictive typing is finished by pressing on a suggested word or entering a space. This is a huge issue for our users since many forget to finish the predictive typing on the last word, before sending a message. Video below
https://github.com/quilljs/quill/assets/155077894/33e5d369-4571-457a-9fe9-b00cf97bf92c
@luin I've spent the last two days debugging what could cause the issue in the video, and to me, it looks like the MutationObserver
in parchments ScrollBlot
constructor (https://github.com/quilljs/parchment/blob/884914fd1bb9b3ac6221ce8d676730b1ec226089/src/blot/scroll.ts#L35C25-L35C41 ) doesn't recognize the text mutation when predictive text is enabled. I'm still debugging and I'll report any new findings I encounter.
P.S. The issues with the placeholder and quill not picking up a word while the word is underlined do not occur on version 1.3.7
I've managed to find what's causing this issue, it's because of the composition*
listeners that are attached during Composition initialization: https://github.com/quilljs/quill/blob/0b383a4d536945fc071fc1e6023ae32e598e49a0/packages/quill/src/core/quill.ts#L213
I'm thinking of forking this project and commenting out that line. However, I'm unsure if that will break other things (I've tested the app with this approach and haven't found any issues so far). @luin since you're one of the maintainers and you have a much deeper knowledge of how Qull works, can you please tell me your thoughts about this approach? Thank you 🙏
Although this workaround fixes the issue with the placeholder, it causes a new issue 😅 When you type quickly, there's a race condition. For example, using the Samsung keyboard with predictive text, when writing Something I get SoSomething. This issue happens only on the first word. I'll continue debugging this issue and report back with new findings.
You can use quill-react-commercial. Feature: When using IME and other input methods (such as Pinyin), placeholders can disappear in a timely manner.
I had to rollback to quill 1.3.7 because of this issue. Waiting for fix. Thanks in advance. My description: It happens when user inserts content from mobile keyboard (in particular SwiftKey) from hints. To insert this hint SwiftKey uses composition event. If editor is empty and user inserts a word from hint text in input appears, but quill contents is not updated. Even if user then start to type - quill will be still empty. ngModelChange, onEditorChange, onContentChange event are not fired in this case.