Mouse back button acting as left click on links. Why?!

Associate
Joined
24 Nov 2024
Posts
34
Location
London, UK
Hi all, I'm not sure if this is a peripheral, browser or HTML issue, but I'm posting here because it doesn't happen on all websites I use. I suspect therefore it's an HTML issue(/function) and would be interested to know how this functionality can be changed on my own website.

When using a web browser I use the two side buttons on my mouse to navigate back/forward a page when I'm browsing a website and clicking through links. However, I've noticed that on some (not all) sites, if I click the side button to go back a page while the mouse cursor is inadvertantly hovering above a link, rather than going back a page it acts as a left click on that link.

Why is this happening only on some websites (it doesn't happen on this forum for instance)? Is there anything I can change on my side (mouse or browser settings) to stop this happening for me on any site? I find it quite annoying. What would I change on my own website to either stop this happening or implement this functionality?
 
If you implement things properly it shouldn't come up, but if you wanted to annoy users by doing it, you'd capture one of the mouse events, e.g. mouseup or mousedown, and then ignore the MouseEvent.buttons value and just go ahead and follow the link even if its not a primary mouse button click.
 
Hmm, it seems to be happening on my own website, yet I've never purposefully implemented it. I'm just testing it out and weirdly it only seems to happen sometimes. I can't work out why.

I'm not sure if it's related to tracking outbound links using Google Tag Manager, although the links I'm testing are all internal.

Anyway, thanks, I'll have to investigate further.
 
Yeah, you could be right. I'm using a Steelseries mouse but don't have the Steelseries software running. Will take a look.
 
Back
Top Bottom