Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
fix focus on new editorState as it didn't have focus so broke when al…
Browse files Browse the repository at this point in the history
…t tab

Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy committed Jul 18, 2018
1 parent 720a728 commit 8bb08b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/views/rooms/MessageComposerInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,9 @@ export default class MessageComposerInput extends React.Component {
}
return editorState;
} else {
// ...or create a new one.
return Plain.deserialize('', { defaultBlock: DEFAULT_NODE });
// ...or create a new one. and explicitly focus it otherwise tab in-out issues
const base = Plain.deserialize('', { defaultBlock: DEFAULT_NODE });
return base.change().focus().value;
}
}

Expand Down

0 comments on commit 8bb08b1

Please sign in to comment.