draft-js not working on IME(composition mode)

Created on 19 Jun 2019  ·  4Comments  ·  Source: facebook/draft-js

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

IME bug

Most helpful comment

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?

All 4 comments

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!

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

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?

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

Was this page helpful?
0 / 5 - 0 ratings