handle Escape properly

close autocomplete, and also replace with plain text part.

also remove leftover logging
pull/21833/head
Bruno Windels 2019-05-09 15:59:48 +02:00
parent 64b171198c
commit ffff66a92d
1 changed files with 5 additions and 2 deletions

View File

@ -26,6 +26,11 @@ export default class AutocompleteWrapperModel {
onEscape(e) {
this._getAutocompleterComponent().onEscape(e);
this._updateCallback({
replacePart: new PlainPart(this._queryPart.text),
replaceCaret: this._queryOffset,
close: true,
});
}
onEnter() {
@ -37,12 +42,10 @@ export default class AutocompleteWrapperModel {
}
onUpArrow() {
console.log("onUpArrow");
this._getAutocompleterComponent().onUpArrow();
}
onDownArrow() {
console.log("onDownArrow");
this._getAutocompleterComponent().onDownArrow();
}