Fix editor losing focus after first word on Android. (#907)
Fix editor losing focus after first word on Android. (#907)

* Fix editor losing focus after first word on Android.

This patch narrows the scope of `restoreEditorDOM` to only blow away the
`DraftEditorContents` instead of the entire editor. The key difference is
that the `contentEditable` DOM element is not replaced, which means that
the soft keyboard isn't dismissed on Android.

Manually tested against "Cut" and "IME" tests:
https://github.com/facebook/draft-js/wiki/Manual-Testing#cutcopypaste
https://github.com/facebook/draft-js/wiki/Manual-Testing#ime

Fixes #888, Ref #626, Ref #102

* Fix editor losing focus after first word on Android.

This patch narrows the scope of `restoreEditorDOM` to only blow away the
`DraftEditorContents` instead of the entire editor. The key difference is
that the `contentEditable` DOM element is not replaced, which means that
the soft keyboard isn't dismissed on Android.

Manually tested against "Cut" and "IME" tests:
https://github.com/facebook/draft-js/wiki/Manual-Testing#cutcopypaste
https://github.com/facebook/draft-js/wiki/Manual-Testing#ime

Fixes #888, Ref #626, Ref #102

facebook/draft-js,dirkholsopple/draft-js,johnmpotter/draft-js,dirkholsopple/draft-js,johnmpotter/draft-js