You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
close autocomplete on enter
This commit is contained in:
@@ -34,7 +34,7 @@ export default class AutocompleteWrapperModel {
|
||||
}
|
||||
|
||||
onEnter() {
|
||||
|
||||
this._updateCallback({close: true});
|
||||
}
|
||||
|
||||
onTab() {
|
||||
|
||||
@@ -116,7 +116,9 @@ export default class EditorModel {
|
||||
}
|
||||
|
||||
_onAutoComplete = ({replacePart, replaceCaret, close}) => {
|
||||
this._replacePart(this._autoCompletePartIdx, replacePart);
|
||||
if (replacePart) {
|
||||
this._replacePart(this._autoCompletePartIdx, replacePart);
|
||||
}
|
||||
const index = this._autoCompletePartIdx;
|
||||
if (close) {
|
||||
this._autoComplete = null;
|
||||
|
||||
Reference in New Issue
Block a user