Move focus to document when closing split with focus

This applies to file browser and HTML output (when configured to be shown in the document window).

Closes #838.