mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-04 13:15:58 +03:00
Hide autocomplete on Enter key press instead of sending message
This commit is contained in:
parent
201fef8b11
commit
a62f68bd39
1 changed files with 6 additions and 0 deletions
|
@ -1046,6 +1046,12 @@ export default class MessageComposerInput extends React.Component {
|
||||||
return change.insertText('\n');
|
return change.insertText('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.autocomplete.countCompletions() > 0) {
|
||||||
|
this.autocomplete.hide();
|
||||||
|
ev.preventDefault();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
const editorState = this.state.editorState;
|
const editorState = this.state.editorState;
|
||||||
|
|
||||||
const lastBlock = editorState.blocks.last();
|
const lastBlock = editorState.blocks.last();
|
||||||
|
|
Loading…
Reference in a new issue