Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with Chinese IME in IE11, still #1546

Closed
jmzhang opened this issue Jun 23, 2017 · 10 comments
Closed

Problems with Chinese IME in IE11, still #1546

jmzhang opened this issue Jun 23, 2017 · 10 comments

Comments

@jmzhang
Copy link

jmzhang commented Jun 23, 2017

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
Copy link
Author

jmzhang commented Jun 24, 2017

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

@jhchen
Copy link
Member

jhchen commented Jul 17, 2017

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

@zdhxiong
Copy link

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

@jmzhang
Copy link
Author

jmzhang commented Jul 19, 2017

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

@kidlj
Copy link

kidlj commented Aug 23, 2017

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

@legends-of-dorothy
Copy link

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

@Husbin
Copy link

Husbin commented Apr 19, 2018

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

@WinMinTun
Copy link

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
Copy link

@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

@quill-bot
Copy link

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 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants