quill icon indicating copy to clipboard operation
quill copied to clipboard

Problems with Chinese IME in IE11, still

Open jmzhang opened this issue 8 years ago • 9 comments

There has been numerous reports already regarding the first letter being ignored by the IME, and the problem seems complicated. After hours digging through the code, I think I might have found a 2-step solution.

So, the problem:

windows IMEs are extremely fragile sometimes, whenever the content is changed or even reflowed, the IME just quit, leaving users' input behind, and this is especially the case in IE11.

How to fix:

step 1 change .ql-blank to use :after pseudo-element instead of :before, so toggling the class won't trigger reflow for the content of the div.

step 2 preserve <br /> during compositions, but it's currently beyond my knowledge to figure out how to implement this.

I've also tested out several other ideas (like changing the default child of BlockBlot to 'text' and use a placeholder character if value is empty; or figure out ways to swap the <br /> with text node on selection-change), but none work best like this approach; please take a look at froala wysiwyg editor in IE11, and inspect the editor div while typing Chinese for a quick demo of this idea.

I'm willing to submit a PR once I understand how to actually implement the second step, hopefully someone could shed some light on this, thanks!

jmzhang avatar Jun 23 '17 19:06 jmzhang

I've made a screencast with Froala editor to demonstrate what I wanted to achieve with Quill.

out

(Chinese in the first <p> block and English in the second <p> block, please note the behavior of <br/> tag)

for comparison, below is the behavior of Quill:

out2

and after getting .ql-blank out of the way:

out3

jmzhang avatar Jun 24 '17 06:06 jmzhang

What version of IE 11 are you using? I'm not seeing what you are seeing in the screencasts for Quill or Froala.

jhchen avatar Jul 17 '17 05:07 jhchen

I have the same problem. It's my IE 11 version: tim 20170719040300

zdhxiong avatar Jul 18 '17 20:07 zdhxiong

Mine was 11.413.15063.0, what's your IE11 version that has it working? lol screen shot 2017-07-19 at 12 04 28 pm

I've managed to apply some patches to my local forks of quill and parchment, and got rid of most of the bugs, but the code is too dirty to share right now.

The key to the problem is to avoid touching the DOM during composition, so some changes has to be made on the Parchment side. The best way I can think of is to include a 'composing' flag in the context object passed to the optimize function call, but I'm not sure if the context argument is really intended for such things, could you confirm? @jhchen

jmzhang avatar Jul 19 '17 04:07 jmzhang

Have the same problem on Windows 10 with Quill 1.3.1, Chrome 60, Microsoft PinYin IME

kidlj avatar Aug 23 '17 10:08 kidlj

@jhchen I am having the same problem when typing in IE11 korean. I hope this problem is resolved.

legends-of-dorothy avatar Jan 05 '18 01:01 legends-of-dorothy

hello I have a problem in ie11,I use selection-change to trigger the blur event, it work well in chrome but in ie11,it trigger in the specified location , and can not work in other area. someone have the same problem? @jmzhang @jhchen

Husbin avatar Apr 19 '18 03:04 Husbin

Any updates on this? @jmzhang @jhchen I think this issue also to do with the issue I m encountering now. I'm writing authorship module. Have the similar problem with Chinese Pinyin Keyboard (which shows pop up) #2305

WinMinTun avatar Sep 12 '18 05:09 WinMinTun

@jhchen @jmzhang A related big issue regarding IME keyboards in collaborative environment. I think it is not directly because of Quill. But it is a big issue and really need attention to it. IME keyboards are not working in collaborative editing as composition disrupts upon others' changes #2314

WinMinTun avatar Sep 16 '18 02:09 WinMinTun

Quill 2.0 has been released (announcement post) with many changes and fixes. If this is still an issue please create a new issue after reviewing our updated Contributing guide :pray:

quill-bot avatar Apr 17 '24 11:04 quill-bot