Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

draft-js not working on IME(composition mode) #2111

Open
liyan-web opened this issue Jun 19, 2019 · 4 comments
Open

draft-js not working on IME(composition mode) #2111

liyan-web opened this issue Jun 19, 2019 · 4 comments

Comments

@liyan-web
Copy link

Do you want to request a feature or report a bug?
bug

What is the current behavior?

  1. Unable to move the cursor with the left and right buttons.
  2. contentState.hasText() return false

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. You can use this jsfiddle to get started: https://jsfiddle.net/stopachka/m6z0xn4r/.
IME (have composition mode. Like Traditional Chinese (Cangjie) IME Keyborad.)

Input key 'abc' > '日月金' but not choosing the word and switch to Cangjie(ENG) input any content(like 'xyz').

屏幕快照 2019-06-19 下午5 28 11

ctrl+a > delete. > Input any content. Now, bug reproduce.

屏幕快照 2019-06-19 下午5 30 49

This error can be reproduced at https://www.facebook.com

What is the expected behavior?

  1. Able to move the cursor with the left and right buttons.
  2. contentState.hasText() should return true

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
Which versions of Draft.js, and which browser: 0.10.5
OS are affected by this issue: Windows 10 1903
Did this work in previous versions of Draft.js: No

@liyan-web
Copy link
Author

liyan-web commented Jun 19, 2019

Others have encountered the same behavior: #1623

But I have other questions:

  • Can't clearState. Sometimes throwing errors.

屏幕快照 2019-06-19 下午5 34 21

* Input and placeholders coincide.

屏幕快照 2019-06-19 下午6 03 21

I hope to get a solution. Thanks!

@ks11singh
Copy link

ks11singh commented Jan 10, 2020

I am facing the same issue issue.
when you try to type "안녕하세요" (It's korean)
Its not detected until non-korean char is detected ( ex: space, or alphabet).
I am using Draft JS 0.11.3

@blobinabottle
Copy link

Facing the same issue. When you type in composition mode, the state is not updated until you click or add a space:
draft-korean

Is #2094 resolving it?

@pbogacz
Copy link

pbogacz commented Aug 17, 2020

I have the same issue like @blobinabottle
@claudiopro Do you know when we can expect fix?

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

No branches or pull requests

5 participants