You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-22 04:02:40 +03:00
remove faulty onBlur/onFocus code which caused selection to rollback
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -1544,18 +1544,6 @@ export default class MessageComposerInput extends React.Component {
|
||||
this.handleKeyCommand('toggle-mode');
|
||||
};
|
||||
|
||||
onBlur = (e) => {
|
||||
this.selection = this.state.editorState.selection;
|
||||
};
|
||||
|
||||
onFocus = (e) => {
|
||||
if (this.selection) {
|
||||
const change = this.state.editorState.change().select(this.selection);
|
||||
this.onChange(change);
|
||||
delete this.selection;
|
||||
}
|
||||
};
|
||||
|
||||
focusComposer = () => {
|
||||
this.refs.editor.focus();
|
||||
};
|
||||
@@ -1601,8 +1589,6 @@ export default class MessageComposerInput extends React.Component {
|
||||
onChange={this.onChange}
|
||||
onKeyDown={this.onKeyDown}
|
||||
onPaste={this.onPaste}
|
||||
onBlur={this.onBlur}
|
||||
onFocus={this.onFocus}
|
||||
renderNode={this.renderNode}
|
||||
renderMark={this.renderMark}
|
||||
// disable spell check for the placeholder because browsers don't like "unencrypted"
|
||||
|
||||
Reference in New Issue
Block a user