I can't identify a pattern to it. About half the time it sets focus to the editor, half the time it doesn't, so it's easy to replicate.