mirror of https://github.com/vector-im/riot-web
handle Escape properly
close autocomplete, and also replace with plain text part. also remove leftover loggingpull/21833/head
parent
64b171198c
commit
ffff66a92d
|
@ -26,6 +26,11 @@ export default class AutocompleteWrapperModel {
|
||||||
|
|
||||||
onEscape(e) {
|
onEscape(e) {
|
||||||
this._getAutocompleterComponent().onEscape(e);
|
this._getAutocompleterComponent().onEscape(e);
|
||||||
|
this._updateCallback({
|
||||||
|
replacePart: new PlainPart(this._queryPart.text),
|
||||||
|
replaceCaret: this._queryOffset,
|
||||||
|
close: true,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onEnter() {
|
onEnter() {
|
||||||
|
@ -37,12 +42,10 @@ export default class AutocompleteWrapperModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
onUpArrow() {
|
onUpArrow() {
|
||||||
console.log("onUpArrow");
|
|
||||||
this._getAutocompleterComponent().onUpArrow();
|
this._getAutocompleterComponent().onUpArrow();
|
||||||
}
|
}
|
||||||
|
|
||||||
onDownArrow() {
|
onDownArrow() {
|
||||||
console.log("onDownArrow");
|
|
||||||
this._getAutocompleterComponent().onDownArrow();
|
this._getAutocompleterComponent().onDownArrow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue