From ffff66a92d894fa6e6ce47f142467ef680be888c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 9 May 2019 15:59:48 +0200 Subject: [PATCH] handle Escape properly close autocomplete, and also replace with plain text part. also remove leftover logging --- src/editor/autocomplete.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/editor/autocomplete.js b/src/editor/autocomplete.js index 18b7cdee57..0512a4ac49 100644 --- a/src/editor/autocomplete.js +++ b/src/editor/autocomplete.js @@ -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(); }