1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 04:42:40 +01:00

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
This commit is contained in:
epriestley 2013-03-19 10:57:54 -07:00
parent d43bcdc1ee
commit 17b9ac41f1

View file

@ -229,6 +229,10 @@ JX.install('Event', {
_keymap : {
8 : 'delete',
9 : 'tab',
// On Windows and Linux, Chrome sends '10' for return. On Mac OS X, it
// sends 13. Other browsers evidence varying degrees of diversity in their
// behavior. Treat '10' and '13' identically.
10 : 'return',
13 : 'return',
27 : 'esc',
37 : 'left',