Only flush the selection when the editor view has focus
Only flush the selection when the editor view has focus

Just as 94a7758 accounts for cases where the editor blurs without losing
the selection, account for the corresponding state when flushing wherein
the editor has the selection but not the focus.

If the editor view does not have focus, then it will set the selection
when it regains focus.

ProseMirror/prosemirror-view