Open Bug 1809106 Opened 2 years ago Updated 1 year ago

Enable `dom.events.asyncClipboard.clipboardItem` on Nightly

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, task)

task

Tracking

()

People

(Reporter: saschanaz, Unassigned)

References

(Depends on 1 open bug, Blocks 4 open bugs)

Details

(Keywords: dev-doc-needed)

Filed this solely to have a tracking bug.

Component: DOM: Events → DOM: Copy & Paste and Drag & Drop

Once enabled, the documentation at https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Experimental_features should be updated.

Also, when a bug for shipping this feature is created (I didn't see one yet), please add the dev-doc-needed flag, so it'll be documented on MDN.

Sebastian

Keywords: dev-doc-needed

This API is necessary to enable copying of image content into the clipboard, which some web application like gitea now offer. I have been using it with the pref enabled since a few months now without issue.

Depends on: 1777448

:saschanaz, when we enable async clipboard, will we also change document.queryCommandSupported('paste') to return true? There is at least one site which will expect that to be true before context-menu pasting will work properly on their editor in Firefox, even with async clipboard (see https://github.com/webcompat/web-bugs/issues/123378 ).

Flags: needinfo?(krosylight)

That implies document.execCommand('paste') should succeed at the point of the call, which is very separate thing from Async Clipboard. And I don't think Chrome returns true there either.

Per the site comment it seems Godbolt copypasted that check from Microsoft's Monaco: https://github.com/microsoft/vscode/blob/b8fe761e224d85fe5c80dc3dfb9976b38d3c36cc/src/vs/editor/contrib/clipboard/browser/clipboard.ts#L27-L30.

Per https://github.com/microsoft/vscode/pull/104646 it looks like someone spoiled the feature detection while working on ancient code, which to be fair is a hard job! But that check is still bad, I think we should fix Monaco and Godbolt instead.

Flags: needinfo?(krosylight)

Good thinking, I've filed https://github.com/microsoft/vscode/issues/184958 and will re-open the webcompat bug to try to reach out to the developer (or to remind us to create a site-intervention when the time comes).

asyncClipboard is also required to paste content into remote desktops with Apache Guacamole.

  • Besides settting dom.events.testing.asyncClipboard to true as explained here https://sudoedit.com/firefox-async-clipboard/
  • on my laptop (tested also with a colleague) it appears that dom.events.asyncClipboard.clipboardItem is also needed

I'm wondering if/when these settings can be enable by default?

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