fix focus on new editorState as it didn't have focus so broke when alt tab

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2018-07-18 10:10:11 +01:00
parent 720a728278
commit 8bb08b1b75
No known key found for this signature in database
GPG Key ID: 3F879DA5AD802A5E
1 changed files with 3 additions and 2 deletions

View File

@ -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;
}
}