Closed Bug 1524392 Opened 6 years ago Closed 6 years ago

Websites are able to disable middle and right click

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

65 Branch
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: peharri, Unassigned)

References

()

Details

(Whiteboard: [needinfo reporter 2019-02-02])

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0

Steps to reproduce:

Example: https://techcrunch.com/2019/01/30/apple-bans-facebook-vpn/

Go to any link, attempt to open in new tab using middle mouse button. Result: opens in current tab replacing article you were reading.
Go back, attempt to use right mouse button: Result: opens in current tab replacing article you were reading without offering a context menu.
Repeat previous process with shift, alt, or any combination, held down: Result: opens in current tab replacing article you were reading without offering a context menu or opening in a new tab

Actual results:

See above

Expected results:

Depending on whether middle or right mouse button was used, link should have been opened in a new tab.

Please do not blame TechCruch for this. I'm not saying don't call them a bunch of moronic cretins who are destroying the web, I'm just saying the web will always be full of moronic cretins. For one, this is just one website of many that's doing this.

No, this is Firefox. Why? This worked fine in previous versions of Firefox, it wasn't possible for idiot web designers to hijack the middle and right mouse buttons. When you switched to the new rendering engine, for some reason you broke this.

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0
20190124174741

Works for me. It's possible the offending script is blocked by uBlock Origin.

I've never seen a page that overrides/disables the middle mouse button; bug 156137 suggests it's not possible to fire the onclick event on middle-click at least.
As far as right-click is concerned, very old Firefox versions had a checkbox in the options to disallow this, but other than its removal, nothing changed. You can hold down the Shift key to always display the default context menu. There are also add-ons like Absolute Enable Right Click & Copy and Happy Right-Click. Unfortunately these workarounds might not be that useful when the right-click action is overridden and you're not aware beforehand.

Has STR: --- → yes
Component: Untriaged → Event Handling
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → All

It's possible the offending script is blocked by uBlock Origin.

I can not reproduce the issue without any extension, and with Content Blocking disabled.

Given comment 2, please test if you can reproduce the issue in a brand new profile.

Flags: needinfo?(peharri)

(In reply to Gingerbread Man from comment #3)

Given comment 2, please test if you can reproduce the issue in a brand new profile.

Feel free to reopen in that case.

Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Flags: needinfo?(peharri)
Resolution: --- → WORKSFORME
Whiteboard: [needinfo reporter 2019-02-02]
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.