dillon1000/react
Commit
Browse files Use KeyboardEvent.char in the fallback logic if available (#9792)
When a user types an emoji via Touch keyboard in IE, React's fallback logic creates the `BeforeInput` event based on the `keypress`. However, the length of an emoji character (e.g. `\uD83D\uDE0A`) is two, so the `which` property does not represent an emoji correctly. Because IE's KeyboardEvent has the `char` property holding an entire emoji, we can use it directly instead of converting from the `which`.
Changed paths2 files
First-parent comparisonsrc/renderers/dom/shared/eventPlugins/BeforeInputEventPlugin.js ModifiedM src/renderers/dom/shared/eventPlugins/__tests__/BeforeInputEventPlugin-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…