Closed Bug 986845 Opened 11 years ago Closed 11 years ago

[e10s] Middle-clicking a link also tries to paste

Categories

(Firefox :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 32
Tracking Status
e10s + ---

People

(Reporter: billm, Assigned: billm)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

If you middle-click a link, the paste action (which navigates to the URL in the clipboard) should be canceled. It's not.
This happens on Linux by default. I think it should be reproducible by setting the middlemouse.paste pref to true on other OSes. You also need something in the clipboard, of course.
Attached patch middle-click-paste (obsolete) — Splinter Review
This turned out to be pretty simple. In e10s, we don't want to run the code for contentAreaClick because we have a separate way to do it. For some reason we add the contentAreaClick event handler in two places: once in gBrowserInit.onload and once on the tabbrowser element in browser.xul. The first one we correctly disable when e10s is on. The second one we don't, and that's why the middle click paste was happening.
Assignee: nobody → wmccloskey
Status: NEW → ASSIGNED
Attachment #8409921 - Flags: review?(felipc)
Unfocused: this came from one of the Australis' big merges, but it was mentioned on IRC that maybe you recall :) It appears we have two tabbrowser listeners for contentAreaClick, one at: http://hg.mozilla.org/mozilla-central/annotate/b79c2995d25e/browser/base/content/browser.js#l769 and the other at: http://hg.mozilla.org/mozilla-central/annotate/b79c2995d25e/browser/base/content/browser.xul#l1078 Do you think it's just a bug, or is there a reason why it's like that? I'm guessing we can remove one of the two without any probs
Flags: needinfo?(bmcbride)
Seems this was the unintentional result of a bad merge. When we moved things around in browser.xul in bug 770135, patch inadvertently didn't take into account the change bug 748740 made to remove contentAreaClick from browser.xul. So this part of the changeset from bug 748740 needs to be re-applied: http://hg.mozilla.org/mozilla-central/diff/eb01f41e077b/browser/base/content/browser.xul
Flags: needinfo?(bmcbride)
Attachment #8409921 - Attachment is obsolete: true
Attachment #8409921 - Flags: review?(felipc)
Attachment #8413879 - Flags: review?(felipc)
Attachment #8413879 - Flags: review?(felipc) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 32
Hi, I wasn't able to reproduce it in order to verify the fix, in Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 ID:20140322030204 CSet: 72c2f9ebf4bc on Debian Sid. These are the steps I've followed to reproduce it: 1. open e10s 2. copy something in the clipboard (select some text, right click on it → Copy) 3. click on a link with the middle button of the mouse (well, the touchpad in my case) Athe link is opened in a new tab, unfocused, and the text copied in clipboard is not pasted anywhere What I'm missing here? :) As said, I'm using Debian Sid and Awesome as window manager. Cheers, Francesca
(In reply to Francesca Ciceri [:madamezou] from comment #8) > Athe link is opened in a new tab, unfocused, and the text copied *As a result, the link... (sorry, sent it accidentally while I was still writing)
QA Whiteboard: [bugday-20140521]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: