web pages should not be able to override mouse buttons

REOPENED
Unassigned

Status

()

P3
normal
REOPENED
a year ago
12 days ago

People

(Reporter: vincent-moz, Unassigned)

Tracking

52 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
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.
(Reporter)

Comment 1

a year ago
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.

Comment 2

a year ago
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)

Updated

a year ago
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)

Comment 4

a year ago
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
Last Resolved: a year ago
Resolution: --- → WORKSFORME

Updated

a year ago
Component: Untriaged → Event Handling
Product: Firefox → Core
(Reporter)

Comment 6

a year ago
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
Last Resolved: a year ago11 months ago
Resolution: --- → WONTFIX
(Reporter)

Comment 8

11 months ago
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
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.