mirror of https://github.com/vector-im/riot-web
Move cursor to end of editor when quoting
When quoting a message, move the selection to the end of the input box. Fixes https://github.com/vector-im/riot-web/issues/2336pull/21833/head
parent
a2d6918562
commit
8b8260c509
|
@ -229,7 +229,8 @@ export default class MessageComposerInput extends React.Component {
|
|||
if (this.state.isRichtextEnabled) {
|
||||
contentState = Modifier.setBlockType(contentState, startSelection, 'blockquote');
|
||||
}
|
||||
const editorState = EditorState.push(this.state.editorState, contentState, 'insert-characters');
|
||||
let editorState = EditorState.push(this.state.editorState, contentState, 'insert-characters');
|
||||
editorState = EditorState.moveSelectionToEnd(editorState);
|
||||
this.onEditorContentChanged(editorState);
|
||||
editor.focus();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue