We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75168f9 commit 6091f40Copy full SHA for 6091f40
packages/react-dom/src/events/getEventCharCode.js
@@ -31,10 +31,12 @@ function getEventCharCode(nativeEvent) {
31
charCode = keyCode;
32
}
33
34
- // Chrome, IE 11 and Edge report Enter as charCode 10 when ctrl is pressed.
+ // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
35
+ // report Enter as charCode 10 when ctrl is pressed.
36
if (charCode === 10) {
37
charCode = 13;
38
39
+
40
// Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
41
// Must not discard the (non-)printable Enter-key.
42
if (charCode >= 32 || charCode === 13) {
0 commit comments