Middle clicking on new tab should search or open what's in the selection clipboard on linux
Categories
(Firefox :: Tabbed Browser, defect, P3)
Tracking
()
People
(Reporter: blacklemon67, Assigned: brice.laurencin)
References
Details
(Keywords: parity-chrome)
Attachments
(4 files, 3 obsolete files)
59 bytes,
text/x-review-board-request
|
Details | |
6.36 KB,
patch
|
Details | Diff | Splinter Review | |
3.78 KB,
patch
|
Details | Diff | Splinter Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
Comment hidden (mozreview-request) |
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Comment 2•7 years ago
|
||
Comment hidden (me-too) |
Comment hidden (me-too) |
Comment 5•4 years ago
|
||
+1
This would be such a nice feature to have. This issue is one of the reasons I've been using Chrome for the past two years.
I'm currently trying out Firefox again and I'm sad that this feature is still not available.
Comment 6•4 years ago
|
||
The attached patch seems like it would apply cleanly (still). Is there any specific reason it hasn't been integrated?
I tried to apply the patch to the latest Firefox less than a month ago, but it seems like its outdated and the surrounding code has changed. One of the big things is that they removed the ability for some UI components, including the new tab button, to react to the middle mouse button.
I've personally updated the patch to work around some of it, and it seems to work. I'll post my updates as an attachment in case someone wants to clean it up.
Comment 10•4 years ago
|
||
The last patch is working for me nicely in Gentoo's (stable) Firefox 78.8. Thank you so much!!
Assignee | ||
Comment 11•3 years ago
|
||
Hello there,
I tried to be smart an apply the patch to the current codebase, but sadely enough, I fail to build firefox locally, I get a HTTP 401 during bootstrap…
I will try yo work around it; meanwhile, here is the patch ported to the said current codebase.
And same question Martin had: is there a specific reason not to merge this?
Assignee | ||
Comment 12•3 years ago
|
||
Comment 13•3 years ago
|
||
(In reply to Brice Laurencin from comment #11)
And same question Martin had: is there a specific reason not to merge this?
Since there hasn't been any feedback, I guess someone just has to submit it to https://phabricator.services.mozilla.com/differential/
Assignee | ||
Comment 14•3 years ago
|
||
I was eventually able to compile Firefox with the fix, it works exactly as advertised, I love it. That was the one feature I was missing from that other browser.
I might try to push to phabricator, we'll see what happens
Updated•2 years ago
|
Comment 15•2 years ago
|
||
Unfortunately patch 20210817 doesn't work for me anymore with Firefox version 109.
It still works for me with 102.7.0. So I'll stick with that version for a while.
Assignee | ||
Comment 16•2 years ago
|
||
Here is an update working with the current codebase.
Enjoy.
Assignee | ||
Comment 17•2 years ago
|
||
Original code from bruntonross@protonmail.com,
adapted to current Firefox version.
Updated•2 years ago
|
Comment 18•2 years ago
|
||
I just successfully patched Firefox 109.
Thank you very much Brice!
Reporter | ||
Comment 19•2 years ago
|
||
Hey all. I found a solution to this that relies on an extension using nativemessaging to get the xclipboard content. I wrote a guide here: suricrasia.online/firefox/
Comment 20•2 years ago
|
||
Hey Brice, just checking in if you're still interested in continuing to work on this patch - no worries if you're just busy and haven't had a chance to come back to this, but let me know if there's anything I can do to help.
Assignee | ||
Comment 21•2 years ago
|
||
I will try to have a look at it this weekend, it's been a bit harder to find time.
Assignee | ||
Comment 22•2 years ago
|
||
A quick message to state that I'm still working on this, just completely lacked time to commit on it in the past few weeks.
my local repo was a mess, and my skills in mercurial close to none, so I bootstrapped a git workspace.
I reapplied the change from phab, but now it does not works so I'm back to square… 2?
I'll try to have something working again and will apply the comments from you Gijs.
Sorry again for the time this is taking.
Assignee | ||
Comment 23•2 years ago
|
||
Original code from bruntonross@protonmail.com,
adapted to current Firefox version.
Updated•2 years ago
|
Comment 24•2 years ago
|
||
Comment 25•2 years ago
|
||
Backed out for causing mochitests failures in browser_middleClick.js.
- Backout link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | browser/components/urlbar/tests/browser/browser_middleClick.js | URLBar has no pasted value - "testsample" == "" - {"filename":"chrome://mochitests/content/browser/browser/components/urlbar/tests/browser/browser_middleClick.js","name":"testMiddleClickToOpenNewTab","sourceId":1930,"lineNumber":160,"columnNumber":10,"sourceLine":"","asyncCause":null,"asyncCaller":{"filename":"chrome://mochitests/content/browser/browser/comp
Comment 26•2 years ago
|
||
Looks like bug 1710289 was filed when this was accidentally implemented (though perhaps there was no navigation?), and people on Linux were upset about this... so when the regression was fixed, a test was added to not bring the behaviour back. That test now started failing on Linux because the default there is for the new behaviour in this patch.
We can update that test to change the pref to false
for that test, which seems the simplest solution. But it probably means that we'll need to monitor feedback about what the default for the new pref needs to be, even on Linux, as it'll probably take some people by surprise.
Comment 27•2 years ago
|
||
Comment 28•2 years ago
|
||
Firstly, thanks for taking over this and updating it.
Secondly, I'm looking at the ticket for 1710289, and it seems like the fix is fixing two things:
- Middle clicking on the URL bar opens a new tab with the paste buffer contents.
- Middle clicking on the new tab button opens a new tab with the paste buffer contents.
However the ticket and discussions only really seem to focus on the new tab bar itself, and not the new tab button. While I agree that middle clicking the bar itself shouldn't use the contents of the selection buffer, I think it makes sense for the new tab button itself. This is consistent with how Chrom(ium) handles it and left clicking the new tab will do the "safe" thing of not opening primary selection contents.
I think it makes sense for this to be enabled on Linux by default, and regardless have a setting to enable/disable it.
Comment 29•2 years ago
|
||
bugherder |
Comment 30•2 years ago
|
||
Release Note Request (optional, but appreciated)
[Why is this notable]: Changes long-standing behaviour of the new tab button on Linux
[Affects Firefox for Android]: No
[Suggested wording]: On Linux, middle clicks on the new tab button will now open the xclipboard contents in the new tab. If the xclipboard content is a URL, that URL is opened, and any other text is opened with your default search provider. This feature can be turned off using browser.tabs.searchclipboardfor.middleclick
in about:config .
[Links (documentation, blog post, etc)]: N/A
Comment 31•2 years ago
|
||
Thanks, added a slightly reworded note to the Nightly release notes. Keeping the relnote? flag open to keep it on the radar for inclusion in our final release notes.
We generally avoid mentioning about:config options in the releases notes. We will keep that last sentance in the nightly/beta release notes, but remove it from the final release notes.
Updated•2 years ago
|
Assignee | ||
Comment 32•2 years ago
|
||
do you want me to have a look at this empty string issue?
seems rather straight forward, and I feel bad for not adding a check on this in the first version
Comment 33•2 years ago
•
|
||
(In reply to Brice Laurencin from comment #32)
do you want me to have a look at this empty string issue?
seems rather straight forward, and I feel bad for not adding a check on this in the first version
Thanks for the offer, but I already have a patch, just fighting an issue with the test at the moment. :-)
Assignee | ||
Comment 34•2 years ago
|
||
<3
Updated•2 years ago
|
Description
•