register focus on top of visibilitychange

my linter threw an error since it was inside a block