Closed
Description
To reproduce:
- In IE11 (on Win7 or Win10) go to https://jsfiddle.net/robbertbrak/84v837e9/164/
- Open the Developer console.
- Switch to the Microsoft Korean IME (standard settings) and switch to Korean input.
- Put the cursor in the contenteditable div and type
여름.
(on a QWERTY keyboard this is typed asdufma.
). - Do the same for the input field.
Result: in the developer console a list of composition events and the contents of the data attribute is logged. However, the data of the firstcompositionend
event is wrong. It should be 여, not 여르. See screenshot below.
You can see that this is wrong by trying out the same thing on https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html. As seen in the screenshot below, a plain (non-React) input field emits a compositionend
event with the proper data.
This occurs with the latest version of React, but I have also seen this behaviour in older versions. An example of where this causes problems is in Draft JS.