Skip to content

Commit f40f77e

Browse files
committed
makes comment more descriptive as to affected platforms
1 parent 9175bb0 commit f40f77e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/renderers/dom/shared/utils/getEventCharCode.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ function getEventCharCode(nativeEvent) {
3737
charCode = keyCode;
3838
}
3939

40-
// Chrome, IE 11 and Edge report Enter as charCode 10 when ctrl is pressed.
40+
// IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
41+
// report Enter as charCode 10 when ctrl is pressed.
4142
if (charCode === 10) {
4243
charCode = 13;
4344
}
45+
4446
// Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
4547
// Must not discard the (non-)printable Enter-key.
4648
if (charCode >= 32 || charCode === 13) {

0 commit comments

Comments
 (0)