Open Bug 1670383 Opened 5 years ago Updated 1 year ago

Split dom.event.clipboardevents.enabled pref to each clibpard event

Categories

(Core :: DOM: UI Events & Focus Handling, enhancement, P5)

Firefox 82
enhancement

Tracking

()

UNCONFIRMED

People

(Reporter: mozilla, Unassigned)

References

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Steps to reproduce:

Set dom.event.clipboardevents.enabled to false.

Actual results:

Gained privacy, stopped websites preventing me from pasting in fields ('please enter your email again').

Stopped the ability to paste images to apps like GitHub and thelounge.

Expected results:

I would like to have the parameter disabled, except when pasting images / files. Websites rely on clipboard events to detect, that content is being pasted in to them.

Having it enabled saves around 10s for each screenshot shared.
Having it disabled saves around 10s, with the time taken to type in a field (possibly introducing human error). There're also other gains, such as privacy.

Proposing dom.event.cliboardevents.paste.enabled, partially overriding dom.event.clipboardevents.enabled.
Websites can (and overall, should) detect pasted content anyways, disabling events for pastes just breaks many websites.

Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core
Severity: -- → N/A
Priority: -- → P3

Splitting the pref to each event could be the only (potentially) valid request. Changing the summary.

OS: Unspecified → All
Priority: P3 → P5
Hardware: Unspecified → All
See Also: → 1104117
Summary: Image paste events with dom.event.clipboardevents.enabled=false → Split dom.event.clipboardevents.enabled pref to each clibpard event
Duplicate of this bug: 1917429

I do not believe https://bugzilla.mozilla.org/show_bug.cgi?id=1917429 is a duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=1670383.

Bug 1670383 requests selective use of the clipboardevents toggle. Bug 1917429 requests a complete ALTERNATIVE to clipboardevents toggle by SIMULATING a keyboard entry. These are very different mechanisms. But since both requests are to be treated under this single bug report, the keyboard simulator also must be described here.

In some situations, there is really no reason for a paste action to be distinguishable from keyboard entry.

(bug 1917429 stated: It may be possible that restarting FF after changing dom.event.clipboardevents.enabled would have made a difference. But that’s still a bad solution because in reading other bug reports it’s clear that disabling clipboardevents has undesirable side-effects.)

Consider this scenario:

I was DEEP into an interactive multi-page interview and had to do SMS confirmations to reach the point I was at. In the middle of this form filling a field was pushed that blocks pastes. Am I supposed to toggle a boolean and restart the browser and repeat the whole interview? No thanks. FF should be better than that. I should be able to right-click one of these anti-user fields and paste on-the-fly. Right-clicking currently gives:

  • paste
  • paste as plain text

We should really have more options like:

Bug 1670383 requests selective use of the clipboardevents toggle. Bug 1917429 requests a complete ALTERNATIVE to clipboardevents toggle by SIMULATING a keyboard entry. These are very different mechanisms. But since both requests are to be treated under this single bug report, the keyboard simulator also must be described here.

In some situations, there is really no reason for a paste action to be distinguishable from keyboard entry.

(bug 1917429 stated: It may be possible that restarting FF after changing dom.event.clipboardevents.enabled would have made a difference. But that’s still a bad solution because in reading other bug reports it’s clear that disabling clipboardevents has undesirable side-effects.)

Consider this scenario:

I was DEEP into an interactive multi-page interview and had to do SMS confirmations to reach the point I was at. In the middle of this form filling a field was pushed that blocks pastes. Am I supposed to toggle a boolean and restart the browser and repeat the whole interview? No thanks. FF should be better than that. I should be able to right-click one of these anti-user fields and paste on-the-fly. Right-clicking currently gives:

  • paste
  • paste as plain text

We should really have more options like:

  • paste from primary clipboard
  • paste from secondary clipboard
  • paste as plain text (not sure what this is)
  • paste from primary clipboard simulating as if typing from the keyboard
  • paste from secondary clipboard simulating as if typing from the keyboard

We should not need to touch the configs in order to paste into a field.

So in addition to what @mozilla@jtag.cat suggested, we also need a keyboard entry simulator that is separate and distinct from the clipboardevents toggle.

Not sure why my text got copied twice there. Would be useful to have an edit feature in here.

You need to log in before you can comment on or make changes to this bug.