React.js – input losing focus when rerendering

Without seeing the rest of your code, this is a guess.
When you create a EditorContainer, specify a unique key for the component:

<EditorContainer key="editor1"/>

When a re-rendering occurs, if the same key is seen, this will tell React don’t clobber and regenerate the view, instead reuse. Then the focused item should retain focus.

Leave a Comment