Do you want to request a feature or report a bug?
Bug
How to reproduce:
clear all text (by set state EditorState.push(this.state.editorState, ContentState.createFromText('')), or EditorState.createEmpty())
write text
insert new line (shift+enter)
write text - some strange behaviour happens
code: https://jsfiddle.net/0oxauau4/
gif: https://giphy.com/gifs/3oKIPzzhEDYgwGVU9q
Draft js 0.10.1 & 0.10.0 & 0.9.0
OS: Mac OS Sierra 10.12.5
Browsers:
Chrome 59.0.3071.115 (64-bit)
Firefox 54.0.1 - I try to test in FF, but got some another problem Error: Got unexpected null or undefined (Draft.js:959)
Safari 10.1.1 - same as in FF
I found 'hack' that usage EditorState.moveFocusToEnd fix problem in all browsers.
Code with 'hack' https://jsfiddle.net/60a4df9a/ (line 36)
Also, another way is set hasFocus to true there https://github.com/facebook/draft-js/blob/master/src/model/immutable/SelectionState.js#L141
Most helpful comment
I found 'hack' that usage
EditorState.moveFocusToEndfix problem in all browsers.Code with 'hack' https://jsfiddle.net/60a4df9a/ (line 36)
Also, another way is set
hasFocustotruethere https://github.com/facebook/draft-js/blob/master/src/model/immutable/SelectionState.js#L141