Middle-clicking to close a tab can cause the selection to be pasted in the URL bar
Categories
(Firefox :: Tabbed Browser, defect)
Tracking
()
People
(Reporter: nika, Unassigned)
Details
Attachments
(1 file)
60.73 KB,
video/x-matroska
|
Details |
On linux, when middle-clicking on a tab to close the tab, if the next tab which will be focused is about:newtab
, the current selection will be pasted into the URL bar of the new about:newtab tab.
I think this is caused by focus being moved into the URL bar of the switched-to tab before the paste event is resolved from the middle-mouse-click.
STR:
- On linux, open the browser, and open 2 tabs.
- Select some text in the content body, putting it onto the selection clipboard.
- middle-click on the focused about:newtab tab, and the text will appear in the URL-bar of the unfocused about:newtab tab.
I've attached a short video of me reproducing the issue
Yeah same problem here.
With a clean profile, middle-clicking anywhere around control elements will leak contents of the clipboard into the URL bar. In my case short text data in the clipboard may not paste, but the formatted data (selected table, image + text) will paste everytime.
Problem occured immediately after update to firefox 87.0, previous version seemed to be fine. OS is slackware-current.
Comment 2•4 years ago
|
||
Hitting same bug when middle clicking new tab button, also new, also on Linux, with (the default) middle click paste enabled etc.
Chiming in to say that:
- Other than the toolbar it happened once with the search bar, pressing ctrl+F pasted something random I selected some time ago, in a different app, instead of the usual default (selection in current tab or recent search).
- It's intermittent.
- Once triggered it's reliable until I interact with something else. In this state clicking any toolbar button that doesn't have a specific middle click action (like the firefox account icon), and some buttons that do (like 'new tab' but not ublock's button) will will reliably paste last selected text into the address bar.
- Selecting some other text will clear it on second or third try.
- Immediately after that playing with text selection and new tab button will reenter the borked state in <10 tries. But an hour later I couldn't get it to trigger.
Comment 3•4 years ago
|
||
Using Firefox 88.0 on Win10, have reproduced the misbehaviors where:
- Middle-click on the empty tab bar to open a new tab also pastes the clipboard content into the new tab's urlbar; or...
- M-click on a tab to close it also pastes the clipboard into the urlbar of next tab to appear (or current tab if closed tab was in background), if that tab was last left with focus in the urlbar.
However, apparently this only occurs if the clipboard content contains a newline char in any position; even a single char prefixed or suffixed with a newline in clipboard will suffice, copied from any app.
Comment 4•3 years ago
|
||
I think this bug was fixed at some point between Firefox 87 and 92. I got it on both KDE and Xfce, and it no longer occurs on my KDE machine, and was fixed on my Xfce live USB stick by upgrading from 87 to 92.
Comment 5•3 years ago
|
||
Confirmed, the misbehaviors I described above now no longer occur in v92 on Win10.
Comment 6•3 years ago
|
||
Yes, can confirm I see this fixed on 91.0.2.
I'm not sure if that's same issue but when I open links from bookmark bar using middle click, content from clipboard also leaks to url bar.
Given that search bar sends information to search engine Firefox might easily send private information where you don't want to. That's pretty bad.
(In reply to gudvinr from comment #7)
I'm not sure if that's same issue but when I open links from bookmark bar using middle click, content from clipboard also leaks to url bar.
Given that search bar sends information to search engine Firefox might easily send private information where you don't want to. That's pretty bad.
I can reproduce this with Firefox 114.0.1 on Linux.
It appears to happen when there are content in the X Primary Selection buffer, and the content contains newline character.
Steps to reproduce:
-
Select some text including newline character, to put them into the X Primary Selection buffer. The
xclip
utility can be used to demonstrate the issue:
echo -e "xyz\n" | xclip -r
-
In Firefox, open a New Tab. Let the focus stay in the address bar.
-
Middle-click on a bookmark (to open it in a new tab)
Expected result:
- The bookmark to open in a new tab.
- No change in the "New Tab" tab.
Actual result:
- The bookmark opened in a new tab.
- In the "New Tab" tab, "xyz " is pasted into the address bar.
I also agree that it could become a privacy issue if search engine suggestion is enabled.
Update: just noticed that this issue appears to be fixed already so I filed a new bug report: bug 1838743
(In reply to wacheo from comment #8)
I also agree that it could become a privacy issue if search engine suggestion is enabled.
Middle-mouse paste should be disabled if you are concerned by clipboard privacy since it is inherently leaky (Bug 1515783). This can be done by going to about:config
and changing middlemouse.paste
to false
.
Fixed by Bug 1701638.
Description
•