You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
Hide autocomplete on Enter key press instead of sending message
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user