Closed Bug 1747207 Opened 4 years ago Closed 2 months ago

Get `middlemouse.paste` from system

Categories

(Core :: Widget: Gtk, task)

Firefox 95
Desktop
Linux
task

Tracking

()

RESOLVED WONTFIX

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/

OS: Unspecified → Linux
Hardware: Unspecified → Desktop

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.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

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.

I would like this feature to remain, at least via a toggle in 'about:config'.

(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.

Blocks: 1747208
Status: UNCONFIRMED → NEW
Type: enhancement → task
Ever confirmed: true
Keywords: sec-want

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).

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/

Assignee: nobody → jordan
Status: NEW → ASSIGNED

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.

Note that the freedesktop article you're referring is from 09 Dec 2010.

Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → WONTFIX

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.

Status: RESOLVED → VERIFIED

Sure, we can mirror global desktop settings.

Status: VERIFIED → REOPENED
Resolution: WONTFIX → ---
Summary: Disable `middlemouse.paste` by default on linux → Get `middlemouse.paste` from system

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.

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.

Status: REOPENED → RESOLVED
Closed: 2 months ago2 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: