Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/phuix/PHUIXAutocomplete.js
| Show First 20 Lines • Show All 193 Lines • ▼ Show 20 Lines | members: { | ||||
| _onkeypress: function(e) { | _onkeypress: function(e) { | ||||
| var r = e.getRawEvent(); | var r = e.getRawEvent(); | ||||
| // NOTE: We allow events to continue with "altKey", because you need | // NOTE: We allow events to continue with "altKey", because you need | ||||
| // to press Alt to type characters like "@" on a German keyboard layout. | // to press Alt to type characters like "@" on a German keyboard layout. | ||||
| // The cost of misfiring autocompleters is very small since we do not | // The cost of misfiring autocompleters is very small since we do not | ||||
| // eat the keystroke. See T10252. | // eat the keystroke. See T10252. | ||||
| if (r.metaKey || r.ctrlKey) { | if (r.metaKey || (r.ctrlKey && !r.altKey)) { | ||||
| return; | return; | ||||
| } | } | ||||
| var code = r.charCode; | var code = r.charCode; | ||||
| if (this._map[code]) { | if (this._map[code]) { | ||||
| setTimeout(JX.bind(this, this._activate, code), 0); | setTimeout(JX.bind(this, this._activate, code), 0); | ||||
| } | } | ||||
| }, | }, | ||||
| ▲ Show 20 Lines • Show All 529 Lines • Show Last 20 Lines | |||||