Open
Description
Extra details
- Similar discussion with extra details and reproducing analysis: Composition Events(Chinese, Japanese IME) problem in controlled components(input, textarea) #8683
- Previous attempt to fix it: Handle composition events in ChangeEventPlugin #8438 (includes some unit tests, but sufficient to be confident in the fix)
Original Issue
When I was trying this example from https://facebook.github.io/react/blog/2013/11/05/thinking-in-react.html, any Chinese characters inputted by Chinese pinyin input method would fire too many renders like:
Actually I would expect those not to fire before I confirm the Chinese character.
Then I tried another kind of input method - wubi input method, I got this:
It's weird too. So I did a test in jQuery:
Only after I press the space bar to confirm the character, the keyup
event would fire.
I know it might be different between the implementation of jQuery keyup
and react onChange
, but I would expect the way how jQuery keyup
handles Chinese characters instead of react's onChange
.