Skip to content

Commit

Permalink
makes comment more descriptive as to affected platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
nstraub committed Aug 30, 2017
1 parent 9175bb0 commit f40f77e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/renderers/dom/shared/utils/getEventCharCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ function getEventCharCode(nativeEvent) {
charCode = keyCode;
}

// 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)
// report Enter as charCode 10 when ctrl is pressed.
if (charCode === 10) {
charCode = 13;
}

// Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
// Must not discard the (non-)printable Enter-key.
if (charCode >= 32 || charCode === 13) {
Expand Down

0 comments on commit f40f77e

Please sign in to comment.