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/2336
This commit is contained in:
parent
a2d6918562
commit
8b8260c509
1 changed files with 2 additions and 1 deletions
|
@ -229,7 +229,8 @@ export default class MessageComposerInput extends React.Component {
|
||||||
if (this.state.isRichtextEnabled) {
|
if (this.state.isRichtextEnabled) {
|
||||||
contentState = Modifier.setBlockType(contentState, startSelection, 'blockquote');
|
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);
|
this.onEditorContentChanged(editorState);
|
||||||
editor.focus();
|
editor.focus();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue