If you're using Google chrome, in the rendering tab. of the devtools, you can "Emulate a focused page", this will make it so that the page stays focused even when clicking elsewhere.