Open Bug 1435281 Opened 4 years ago Updated 2 years ago

web pages should not be able to override mouse buttons


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

52 Branch





(Reporter: vincent-moz, Unassigned)


User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20180124084836

Steps to reproduce:

1. Go to one of the topics of the Open Hub forums, e.g.
2. Start to write a message as a reply.
3. Paste a URL with the middle button.

Actual results:

The URL is opened as a replacement of the current page, so that the message was lost (with Back, it was not restored).

Expected results:

The URL should have been pasted, and no data should have been lost.
Note: Just after (2), there should be: select a URL somewhere (so that the PRIMARY selection contains the URL).

Moreover, I've noticed that if I change middlemouse.contentLoadURL to false in about:config, then nothing happens. So, the issue seems to be that Firefox fails to recognize that the URL could be pasted, which is a major problem as with middlemouse.contentLoadURL set to true, this may yield data loss as explained.
Start the latest Nightly [1] in a brand new profile [2]. In about:config, make sure middlemouse.contentLoadURL is set to false and middlemouse.paste is set to true. Do you get the expected behavior, or can you reproduce the issue?

Flags: needinfo?(vincent-moz)
Ever confirmed: true
Devin, since you confirmed this issues as true and Vincent is not replying back, can you please provide the information required in comment 2?

Thank you!
Flags: needinfo?(megadev44s.mail)
I can confirm on the latest nightly on x82 windows 7 professional, that it still occours, on the mentioned website. However, I  think I was able to correct it by uninstalling and reinstalling completely  as it works perfectly fine now.
Flags: needinfo?(megadev44s.mail)
Based on comment 4, I'll close this issue as Resolved Works for Me.
Closed: 4 years ago
Resolution: --- → WORKSFORME
Component: Untriaged → Event Handling
Product: Firefox → Core
I can still reproduce the issue with the latest Nightly:

i.e. nothing occurs when I click with the middle button. And if I change middlemouse.contentLoadURL to true, the URL is opened in the current tab instead of being pasted. So, that's exactly the same issue with Nightly.
Flags: needinfo?(vincent-moz)
Resolution: WORKSFORME → ---
Getting to the comment form requires login. Form fields available without login accept middle-click paste. However, in general, for better or worse, the Web Platform allows page JS to handle events to make apps like Google Docs or games, so AFAICT, this is WONTFIX territory in the browser. Complaining to the site might work.
Closed: 4 years ago4 years ago
Resolution: --- → WONTFIX
I disagree with the reason. I don't see how this can be different from keys (bug 380637, which has been fixed). Games need to be able to override keys too!
OK. I guess we could introduce a site permission for this.
Resolution: WONTFIX → ---
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.