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:
parent
d43bcdc1ee
commit
17b9ac41f1
1 changed files with 4 additions and 0 deletions
4
externals/javelinjs/src/core/Event.js
vendored
4
externals/javelinjs/src/core/Event.js
vendored
|
@ -229,6 +229,10 @@ JX.install('Event', {
|
||||||
_keymap : {
|
_keymap : {
|
||||||
8 : 'delete',
|
8 : 'delete',
|
||||||
9 : 'tab',
|
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',
|
13 : 'return',
|
||||||
27 : 'esc',
|
27 : 'esc',
|
||||||
37 : 'left',
|
37 : 'left',
|
||||||
|
|
Loading…
Reference in a new issue