Open Bug 1619251 Opened 4 years ago Updated 28 days ago

[meta] Clipboard API improvements

Categories

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

task

Tracking

()

People

(Reporter: evilpie, Unassigned)

References

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

Details

(Keywords: meta, parity-chrome, parity-safari)

Right now Firefox only supports Clipboard.writeText and Clipboard.readText and only for WebExtensions. Chrome already supports write/read with images.

Depends on: 1560373
Depends on: 1554855
Summary: Async Clipboard API for web pages → [meta] Async Clipboard API for web pages
Depends on: 1619723
Depends on: 1619947

Seems like Safari 13.1 just shipped with this API as well: https://webkit.org/blog/10247/new-webkit-features-in-safari-13-1/

Keywords: parity-safari

According to https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API, firefox is the only modern browser that doesn't have this. Is there any progress on this?

Depends on: 1646270
Depends on: 1670252
No longer depends on: 1494266
No longer depends on: 1554855
No longer depends on: 1619723
Depends on: 1620420
Summary: [meta] Async Clipboard API for web pages → [meta] Clipboard API improvements
Depends on: 1434915
Blocks: 1662100
See Also: → 1615397
See Also: → 1636028
Depends on: 1688279
Depends on: 1688865
Component: DOM: Events → DOM: Core & HTML
Depends on: 1691825
Depends on: 1693750
Depends on: 1699743
Component: DOM: Core & HTML → DOM: Copy & Paste and Drag & Drop
Depends on: 1712122
Depends on: 1728425
Depends on: 1753202
Depends on: 1766860
Depends on: 1769678
Depends on: 1756955
Depends on: 1773477
No longer depends on: 1778971
Severity: normal → S3
Depends on: 864052
Blocks: 1806457
Depends on: 1763600

Stumbled on to this, while noticing that Safari and Chrome do implement Clipboard API, but Firefox

a) requires enabling a pref dom.events.asyncClipboard.readText, and
b) after that pref has been enabled, which exposes navigator.clipboard.readText() function, calling that function will cause an ad hoc popup dialog "Paste" to appear on the page that the user needs to click.

In Chrome, access to Clipboard is managed via the Permissions API. I wonder if Firefox has intent to implement same UX at some point? Or are there some qualms about using Permissions API for this purpose? (In particular, Permissions API is a one-off request for the lifetime of the site, whereas Firefox's current ad hoc popup appears on every paste operation)

(In reply to Jukka Jylänki from comment #4)

Stumbled on to this, while noticing that Safari and Chrome do implement Clipboard API, but Firefox

a) requires enabling a pref dom.events.asyncClipboard.readText, and
b) after that pref has been enabled, which exposes navigator.clipboard.readText() function, calling that function will cause an ad hoc popup dialog "Paste" to appear on the page that the user needs to click.

In Chrome, access to Clipboard is managed via the Permissions API. I wonder if Firefox has intent to implement same UX at some point? Or are there some qualms about using Permissions API for this purpose? (In particular, Permissions API is a one-off request for the lifetime of the site, whereas Firefox's current ad hoc popup appears on every paste operation)

No, we don't plan to implement same UX as Chrome. Our approach is similar to Safari's, here is our intent to prototype. We are currently working on bug 1777448 to avoid button popup when user's privacy isn't affected.

Depends on: 1858788
Depends on: 1777197
Depends on: 1890995
Depends on: 1766803
Depends on: 1777939
Depends on: 1785375
Depends on: 1773681
Depends on: 1767941
No longer blocks: 1640222
No longer blocks: 1806457
You need to log in before you can comment on or make changes to this bug.