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
focus editor after clicking edit
This commit is contained in:
@@ -144,6 +144,13 @@ export default class MessageEditor extends React.Component {
|
||||
|
||||
componentDidMount() {
|
||||
this._updateEditorState();
|
||||
const sel = document.getSelection();
|
||||
const range = document.createRange();
|
||||
range.selectNodeContents(this._editorRef);
|
||||
range.collapse(false);
|
||||
sel.removeAllRanges();
|
||||
sel.addRange(range);
|
||||
this._editorRef.focus();
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
Reference in New Issue
Block a user