Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/phuix/PHUIXAutocomplete.js
| Show First 20 Lines • Show All 191 Lines • ▼ Show 20 Lines | _deactivate: function() { | ||||
| this._active = false; | this._active = false; | ||||
| this._visible = false; | this._visible = false; | ||||
| }, | }, | ||||
| _onkeypress: function(e) { | _onkeypress: function(e) { | ||||
| var r = e.getRawEvent(); | 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; | 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 504 Lines • Show Last 20 Lines | |||||