Remove your mouse.
See if it happens when your using the touch pad (If your on a Laptop).
Try a new / borrowed mouse.
It can be a fault with the mouse.
And it may have software that allows tricks with the buttons
when in windows (Files) and not in a Internet window.
Sounds like a faulty mouse

Good Luck.