Found browser compatibility issues. It works consistently if the page is loaded scrolled all the way to the top. If the user refreshes the page while scrolled further down, mouse input breaks. I will need to do some research.