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

characters in selecting range disapear #5087

Open
kyuwoo-choi opened this issue Nov 16, 2017 · 3 comments
Open

characters in selecting range disapear #5087

kyuwoo-choi opened this issue Nov 16, 2017 · 3 comments

Comments

@kyuwoo-choi
Copy link

Browser: IE11

CodeMirror: 5.30.0 (I can reproduce this issue using demo on http://codemirror.net/ too at this moment)

Steps:

  1. write some korean words(may be multi type languages)
  2. backspace, delete some characters
  3. write korean characters again
  4. try select a range using mouse
  5. selected range deleted
  6. later on, the characters in range will be gone continually

ezgif com-add-text

@marijnh marijnh added the IME label Nov 20, 2017
@marijnh
Copy link
Member

marijnh commented Nov 20, 2017

Thanks for your report. I may be a while until someone sets up an IE11 with Korean IME to debug this. If you want to look into it yourself, the problem probably lies somewhere in the composition event handling in src/input/TextareaInput.js -- possibly it is failing to exit composition mode, either because the browser isn't sending the right events, or because of a bug in the CodeMirror code.

@kyuwoo-choi
Copy link
Author

@marijnh I've looked into it.
It seems that resetting textinput failed.
The TextareaInput.reset() is called on the step 4 above.
And cm.somethingSelected() returns false on IE while it does true on Chrome

https://github.com/codemirror/CodeMirror/blob/2c741bd6742678f67e812307b2f78db4f4566d9d/src/input/TextareaInput.js#L138-L151

End up with passing condition below
https://github.com/codemirror/CodeMirror/blob/2c741bd6742678f67e812307b2f78db4f4566d9d/src/input/TextareaInput.js#L215
and executing code below with wrong values.
https://github.com/codemirror/CodeMirror/blob/2c741bd6742678f67e812307b2f78db4f4566d9d/src/input/TextareaInput.js#L234-L247

But I have no idea how to fix. may be similar to how you fix for #1730
I need you to guide me.

@adrianheine
Copy link
Contributor

This is one of many issues which are difficult to solve with the fundamental approach currently taken by CodeMirror.

We are working on a rewrite (CodeMirror 6) that will overhaul input handling and should address this issue, and we are currently raising money for this work: See the announcement for more information about the rewrite and a demo.

Note that CodeMirror 6 is by no means stable or usable in production, yet. It is highly unlikely that we pick up this issue for CodeMirror 5, though.

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

No branches or pull requests

3 participants