Get `middlemouse.paste` from system
Categories
(Core :: Widget: Gtk, task)
Tracking
()
People
(Reporter: katyaberezyaka, Assigned: jordan)
References
Details
(Keywords: sec-want, ux-error-prevention)
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0
Expected results:
Middlepaste is bad and needs to be disabled by default https://www.reddit.com/r/Fedora/comments/rlwhci/how_do_you_disable_middle_click_paste_in/
Comment 1•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
This is also a security concern. Middle-click paste conflicts with the Firefox shortcut for middle-click opening links in a new tab, which many people use. This means that middle-clicking could paste sensitive information (eg. passwords from a password manager) into a page when the user does not intend to and without the user's knowledge. Many pages run rogue Javascript that silently listens for paste events, so intercepting pastes like this is easy.
Even if you make middle-clicking on a link not trigger middle-click paste it is still a security issue because the user may simply miss the link and click elsewhere in the page. There's also middle-click autoscrolling, which currently does not eliminate middle-click paste either.
Comment 3•4 years ago
|
||
I would like this feature to remain, at least via a toggle in 'about:config'.
Comment 4•4 years ago
|
||
(In reply to nicoenkarin from comment #3)
I would like this feature to remain, at least via a toggle in 'about:config'.
I don't ask to remove this feature, i ask for disabling it by default, and preferably with adding option for it in ui.
Updated•4 years ago
|
Updated•4 years ago
|
Middle click to paste selection buffer is a decades-old feature of Unix and Linux workstations and should not be removed. I have no problem with an option to disable it but shipping an application that deliberately rejects platform user interface norms is a bad idea.
It should be noted that Wayland allows compositors to disable middle-click pasting, and at least KDE already exposes a control for this in its settings. The most robust solution, therefore, would be to mirror the compositor's setting. Firefox currently does not do so (and if I had to guess, this is a GTK issue).
| Assignee | ||
Comment 8•2 months ago
|
||
This is a little known feature and behavior that leads into user confusion
when they click the middle mouse button without knowing about its
functionality. Most of the time, its also clicked by accident, and its
very weird o have the clipboard dumped on such occasions.
The feature is also not discoverable at all, and even on the Freedesktop
wiki page, the entirity of the "PRIMARY" selection is refferred to as
an "easter egg".
The correct behavior can be summarized as follows: CLIPBOARD works
just like the clipboard on Mac or Windows; it only changes on explicit
cut/copy. PRIMARY is an "easter egg" for expert users, regular users
can just ignore it; it's normally pastable only via middle-mouse-click.
https://www.freedesktop.org/wiki/Specifications/ClipboardsWiki/
Updated•2 months ago
|
Comment 9•2 months ago
|
||
Middle mouse paste was added to Wayland protocol in 2015 (https://wiki.gnome.org/Initiatives/Wayland/PrimarySelection) as it was missing there. If we disable it, Firefox will be the only desktop application which doesn't support it which will lead to lot of confused users and bugreports.
Comment 10•2 months ago
|
||
Note that the freedesktop article you're referring is from 09 Dec 2010.
Updated•2 months ago
|
| Assignee | ||
Comment 11•2 months ago
|
||
It's still supported, but disabled by default.
The feature is entirely undiscovered and unexpected behavior to have by default. Both firefox and webapps, like canvasing apps, use the middle click for other things. People end up very confused when their clipboard gets pasted out of nowhere without any indication what so ever what happened.
There is universal design consensus that this is a bad idea to have it enabled by default. Why are we jumping the gun to immediately mark it as won't fix? The people that are willingly using this to paste can trivially enable the config key again, or as emilio suggested on phabricator, we can make it mirror the Desktop wide setting.
Comment 12•2 months ago
|
||
Sure, we can mirror global desktop settings.
Updated•2 months ago
|
Comment 13•2 months ago
|
||
It should be noted that on Linux, general.autoScroll defaults to false while on other platforms (or at least on Windows) it defaults to true. This is the "click middle mouse to scroll in the direction of the cursor" option. The average user who doesn't use middle-mouse pasting likely expects middle-click to autoscroll, so it may be a good idea to turn enable when middle-mouse pasting is disabled.
Comment 14•2 months ago
|
||
Firefox enables middle past click if middle click paste is advertised by by Wayland compositor by gtk_primary_selection_device_manager / zwp_primary_selection_device_manager_v1.
Is you want Firefox to stop using that, just disable that at compositor level. That disables it for all Wayland applications and not Firefox only which is consistent.
There's nothing actionable on Firefox side, we're not going to add Firefox hacks only for it.
Description
•