Does this happen randomly or are you switching windows/clicking outside of the game frame?
Because if you click the window to focus it again but you don't click the actual game frame that's what's going to happen, you're just gonna scroll horizontally.
I'd recommend you to use another browser btw (Firefox, chrome, etc)
Sent from my quantum supercomputer