Skip to content

Commit 6091f40

Browse files
committed
makes comment more descriptive as to affected platforms
1 parent 75168f9 commit 6091f40

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/react-dom/src/events/getEventCharCode.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ function getEventCharCode(nativeEvent) {
3131
charCode = keyCode;
3232
}
3333

34-
// Chrome, IE 11 and Edge report Enter as charCode 10 when ctrl is pressed.
34+
// IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
35+
// report Enter as charCode 10 when ctrl is pressed.
3536
if (charCode === 10) {
3637
charCode = 13;
3738
}
39+
3840
// Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
3941
// Must not discard the (non-)printable Enter-key.
4042
if (charCode >= 32 || charCode === 13) {

0 commit comments

Comments
 (0)