Skip to content

Commit 17b9ac4

Browse files
author
epriestley
committedMar 19, 2013
Treat keyCode 10 as "return" in JX.Event
Summary: Fixes T2753. Return is sent as either 10 or 13, depending on browser and OS. See, e.g. [[ http://code.google.com/p/chromium/issues/detail?id=79407 | this Chromium issue ]]. Test Plan: @CyStorm confirmed this patch fixes the issue on his system. Reviewers: btrahan, codeblock Reviewed By: codeblock CC: cystorm, aran Maniphest Tasks: T2753 Differential Revision: https://secure.phabricator.com/D5381
1 parent d43bcdc commit 17b9ac4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎externals/javelinjs/src/core/Event.js

+4
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,10 @@ JX.install('Event', {
229229
_keymap : {
230230
8 : 'delete',
231231
9 : 'tab',
232+
// On Windows and Linux, Chrome sends '10' for return. On Mac OS X, it
233+
// sends 13. Other browsers evidence varying degrees of diversity in their
234+
// behavior. Treat '10' and '13' identically.
235+
10 : 'return',
232236
13 : 'return',
233237
27 : 'esc',
234238
37 : 'left',

0 commit comments

Comments
 (0)
Failed to load comments.