Open Bug 1435281 Opened 7 years ago Updated 2 years ago

web pages should not be able to override mouse buttons

Categories

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

52 Branch
defect

Tracking

()

REOPENED

People

(Reporter: vincent-moz, Unassigned)

Details

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. https://www.openhub.net/topics/14527
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?

[1] https://nightly.mozilla.org 
[2] https://support.mozilla.org/kb/profile-manager-create-and-remove-firefox-profiles
Flags: needinfo?(vincent-moz)
Status: UNCONFIRMED → NEW
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.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Component: Untriaged → Event Handling
Product: Firefox → Core
I can still reproduce the issue with the latest Nightly:

  https://hg.mozilla.org/mozilla-central/rev/a007dd56b9947a93c276e82275d7065db1949c9e

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.
Status: RESOLVED → REOPENED
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.
Status: REOPENED → RESOLVED
Closed: 7 years ago6 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.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Priority: -- → P3
Component: Event Handling → User events and focus handling
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.