Skip to content

Incorrect data in compositionend event when typing Korean on IE11 #10217

Closed
@robbertbrak

Description

@robbertbrak

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 as dufma.).
  • 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 first compositionend event is wrong. It should be 여, not 여르. See screenshot below.

selection_329

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.

korean-11 413 15063 0

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions