Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async Clipboard API is "all red" #1249

Closed
captainbrosset opened this issue Jun 14, 2024 · 9 comments · Fixed by #1349
Closed

Async Clipboard API is "all red" #1249

captainbrosset opened this issue Jun 14, 2024 · 9 comments · Fixed by #1349
Labels
bug Something isn't working

Comments

@captainbrosset
Copy link
Contributor

Reported by @tomayac here: https://toot.cafe/@tomayac/112614061442371457

See the status: https://web-platform-dx.github.io/web-features-explorer/features/async-clipboard/

Compare to Can I Use: https://caniuse.com/async-clipboard

Here are the BCD keys used to compute our status:

  • api.Clipboard
  • api.Clipboard.read
  • api.Clipboard.readText
  • api.Clipboard.write
  • api.Clipboard.writeText
  • api.ClipboardEvent
  • api.ClipboardEvent.ClipboardEvent
  • api.ClipboardEvent.clipboardData
  • api.ClipboardItem
  • api.ClipboardItem.ClipboardItem
  • api.ClipboardItem.getType
  • api.ClipboardItem.presentationStyle
  • api.ClipboardItem.types
  • api.Navigator.clipboard
  • api.Permissions.permission_clipboard-read
@ddbeck
Copy link
Collaborator

ddbeck commented Jun 17, 2024

The overall non-support is due to BCD reporting that:

  • Firefox and Safari don't support the clipboard-read permission (api.Permissions.permission_clipboard-read).
  • Chrome does not support ClipboardItem's presentationStyle property and only partially supports read and readText methods (api.Clipboard.read*).

It's unclear to me whether BCD, caniuse, or both have errors. BCD and caniuse differ significantly. Major differences are:

  • readText: BCD says this is partially supported in Chrome, caniuse says Firefox doesn't support it.
  • writeText: BCD says this is fully supported in Safari for iOS, but caniuse says it's unsupported.

Resolving this would be a three step process:

@ddbeck ddbeck added the bug Something isn't working label Jun 17, 2024
foolip added a commit to foolip/web-features that referenced this issue Jul 4, 2024
@foolip
Copy link
Collaborator

foolip commented Jul 4, 2024

#1315 should improve this.

@foolip
Copy link
Collaborator

foolip commented Jul 4, 2024

Some cleanup of the tags BCD keys in mdn/browser-compat-data#23658.

@ddbeck
Copy link
Collaborator

ddbeck commented Jul 8, 2024

Copying from myself on #1294 (comment)

Hmm, yeah, that's iffy data. Two thoughts here:

  • The partial seems to be the requirement to have the (non-standard?) clipboard-read permission. I can't find that permission specified anywhere, which makes it hard to understand.

  • Those media types should be subfeatures of read instead of notes. Probably something like text/plain and image/png ought to be in compute_from list?

@foolip
Copy link
Collaborator

foolip commented Jul 8, 2024

What should we consider the scope of this feature to be?

#1315 would make it navigator.clipboard.writeText(). At the same time https://caniuse.com/async-clipboard is about both reading and writing, as it treats Safari iOS as a partial implementation with the note "Supports writing to clipboard but not reading."

@foolip
Copy link
Collaborator

foolip commented Jul 10, 2024

I looked into the Safari iOS issue on caniuse and filed Fyrd/caniuse#7105.

At this point I'm fairly certain that all four methods (read(), readText(), write(), writeText()) work in all browsers, but there are differences in permissions, requirements for user interaction, and UX, that developers need to understand in order to write code that works everywhere. We don't have notes in web-features, so BCD is the place for that.

In web-features, since the scope of the feature is all four methods, I think we should set a Baseline low date accordingly. This will have to be done manually because BCD has partial_implementation still.

@foolip
Copy link
Collaborator

foolip commented Jul 10, 2024

I've sent mdn/browser-compat-data#23735 which removes partial impl for Chromium in BCD.

foolip added a commit to foolip/web-features that referenced this issue Jul 10, 2024
The manually added status is what will result from treating all 4
methods on navigator.clipboard as required parts of the feature.

Comment out read() and readText() to not bless the incorrect status
computed from BCD.

Fixes web-platform-dx#1249.
foolip added a commit to foolip/web-features that referenced this issue Jul 10, 2024
The manually added status is what will result from treating all 4
methods on navigator.clipboard as required parts of the feature.

Comment out read() and readText() to not bless the incorrect status
computed from BCD.

Fixes web-platform-dx#1249.
@foolip foolip closed this as completed in 9c0b535 Jul 10, 2024
@ddbeck
Copy link
Collaborator

ddbeck commented Jul 16, 2024

I've sent mdn/browser-compat-data#23735 which removes partial impl for Chromium in BCD.

Superseded by mdn/browser-compat-data#23593.

@ddbeck
Copy link
Collaborator

ddbeck commented Jul 16, 2024

Bringing some text from a comment on the YAML file here, so I can use this issue a clearinghouse for all the history of this feature's data issues.

Differences between web-features and caniuse.com are tracked here:
Fyrd/caniuse#7105
Fyrd/caniuse#7106
Fyrd/caniuse#7107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants