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

Trigger autocomplete when "@" is typed on German keyboards

Summary:
Ref T10252. On the German keyboard layout, you must type "Alt" + "L" to generate an "@" character.

We currently ignore this event, assuming it's a keyboard command. However, I think we can safely continue so that autocomplete works on German layouts.

Test Plan:
  - Switched keyboard layout to German.
  - Typed Alt + L to generate an "@".
  - Typed some username text.
  - Got autocompleter.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10252

Differential Revision: https://secure.phabricator.com/D16259
This commit is contained in:
epriestley 2016-07-08 08:17:51 -07:00
parent bd6d300282
commit a8a9fddb07
2 changed files with 13 additions and 9 deletions

View file

@ -523,7 +523,7 @@ return array(
'rsrc/js/phui/behavior-phui-tab-group.js' => '0a0b10e9',
'rsrc/js/phuix/PHUIXActionListView.js' => 'b5c256b8',
'rsrc/js/phuix/PHUIXActionView.js' => '8cf6d262',
'rsrc/js/phuix/PHUIXAutocomplete.js' => '9196fb06',
'rsrc/js/phuix/PHUIXAutocomplete.js' => '6d86ce8b',
'rsrc/js/phuix/PHUIXDropdownMenu.js' => '82e270da',
'rsrc/js/phuix/PHUIXFormControl.js' => 'e15869a8',
'rsrc/js/phuix/PHUIXIconView.js' => 'bff6884b',
@ -871,7 +871,7 @@ return array(
'phui-workpanel-view-css' => '92197373',
'phuix-action-list-view' => 'b5c256b8',
'phuix-action-view' => '8cf6d262',
'phuix-autocomplete' => '9196fb06',
'phuix-autocomplete' => '6d86ce8b',
'phuix-dropdown-menu' => '82e270da',
'phuix-form-control-view' => 'e15869a8',
'phuix-icon-view' => 'bff6884b',
@ -1441,6 +1441,12 @@ return array(
'javelin-typeahead',
'javelin-uri',
),
'6d86ce8b' => array(
'javelin-install',
'javelin-dom',
'phuix-icon-view',
'phabricator-prefab',
),
'70baed2f' => array(
'javelin-install',
'javelin-dom',
@ -1608,12 +1614,6 @@ return array(
'javelin-dom',
'javelin-request',
),
'9196fb06' => array(
'javelin-install',
'javelin-dom',
'phuix-icon-view',
'phabricator-prefab',
),
92197373 => array(
'phui-workcard-view-css',
),

View file

@ -197,7 +197,11 @@ JX.install('PHUIXAutocomplete', {
_onkeypress: function(e) {
var r = e.getRawEvent();
if (r.metaKey || r.altKey || r.ctrlKey) {
// NOTE: We allow events to continue with "altKey", because you need
// to press Alt to type characters like "@" on a German keyboard layout.
// The cost of misfiring autocompleters is very small since we do not
// eat the keystroke. See T10252.
if (r.metaKey || r.ctrlKey) {
return;
}