fix form escape

This commit is contained in:
Cade Scroggins 2018-12-16 13:38:56 -08:00
parent 5a094e8868
commit af1af35b67
No known key found for this signature in database
GPG key ID: 519697F4ACAF4893

View file

@ -1051,7 +1051,7 @@
this._toggleHelp = options.toggleHelp;
this._clearPreview = this._clearPreview.bind(this);
this._handleInput = this._handleInput.bind(this);
this._handleKeypress = this._handleKeypress.bind(this);
this._handleKeydown = this._handleKeydown.bind(this);
this._previewValue = this._previewValue.bind(this);
this._submitForm = this._submitForm.bind(this);
this._submitWithValue = this._submitWithValue.bind(this);
@ -1089,7 +1089,7 @@
if (this._suggester) this._suggester.suggest(newQuery);
}
_handleKeypress(e) {
_handleKeydown(e) {
if ($.isUp(e) || $.isDown(e) || $.isRemove(e)) return;
switch ($.key(e)) {
@ -1123,7 +1123,7 @@
}
_registerEvents() {
document.addEventListener('keypress', this._handleKeypress);
document.addEventListener('keydown', this._handleKeydown);
this._inputEl.addEventListener('input', this._handleInput);
this._formEl.addEventListener('submit', this._submitForm, false);