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

Remove clipboard-read permission #132

Merged
merged 2 commits into from
Oct 29, 2020
Merged

Remove clipboard-read permission #132

merged 2 commits into from
Oct 29, 2020

Conversation

saschanaz
Copy link
Member

@saschanaz saschanaz commented Aug 11, 2020

Closes #101, see also w3c/permissions#175

For normative changes, the following tasks have been completed:

  • Modified Web platform tests (link to pull request)

Implementation commitment:


Preview | Diff

Copy link
Member

@marcoscaceres marcoscaceres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this work @saschanaz.

@pwnall
Copy link

pwnall commented Aug 25, 2020

Chrome has shipped the clipboard-read permission, so this would be a breaking change for us.

@dway123 do we have any data we could share about the magnitude of the breakage?

@dway123
Copy link

dway123 commented Oct 19, 2020

Sure. The suggested removal of clipboard-read here implies requiring user activation to gate Clipboard read. Therefore, this should break any site that currently doesn't require user activation to read the clipboard.

While we don't know the exact magnitude of the breakage (we don't currently have metrics on clipboard read use without user activation), we do know that:

  • .03% of pageloads currently use clipboard.read(), and .22% of pageloads currently use clipboard.readText(). The subset of these sites that doesn't do so requiring user activation would be broken by this change.
  • As of September 2020, 11,088 unique sites made use of the Async Clipboard API, according to the HTTP Archive. This number may be higher now, but also includes sites using clipboard write but not clipboard read, or clipboard read, but with user activation, so may represent more than the complete list of affected sites.
  • Remote desktop applications, including cendio.com, as well as Chrome Remote Desktop, would be broken by this change, as this would disallow them to propagate clipboard updates.

@rniwa
Copy link

rniwa commented Oct 20, 2020

Sure. The suggested removal of clipboard-read here implies requiring user activation to gate Clipboard read. Therefore, this should break any site that currently doesn't require user activation to read the clipboard.

Aren't those sites also broken in Firefox & Safari? Or are you more concerned about Chrome only content?

@dway123
Copy link

dway123 commented Oct 20, 2020

Aren't those sites also broken in Firefox & Safari? Or are you more concerned about Chrome only content?

I suspect but have not verified these sites are also broken in Firefox and Safari, if they require user gesture for all Clipboard reads. I only discussed Chrome content because the question was regarding breakage in Chrome, and I only had public use information for Chrome, like chromestatus feature use data. Please share information about breakage in Firefox & Safari, if possible, to provide more color for this conversation. Sorry, I'm not well acquainted with available public data for Firefox & Safari.

@marcoscaceres
Copy link
Member

Please share information about breakage in Firefox & Safari, if possible, to provide more color for this conversation.

I don't think Firefox typically collects this kind of information (though some from Mozilla can correct me). They would need to check specific sites to see if they are breaking. However, likelihood is that they are not broken if the read is happening along with a user gesture... hopefully sites have figured that out already and at mitigating breakage by calling the API as a result of user activation.

@saschanaz
Copy link
Member Author

I can confirm that Mozilla doesn't have a use counter for navigator.clipboard.

@marcoscaceres
Copy link
Member

So, just chiming in a chair here. The appropriate course of action would be to merge this to match implementations. Then, as a followup, if folks from Google would still like to pursue this option, it might be worth sending a PR reverting the changes made in this PR.

@rniwa
Copy link

rniwa commented Oct 26, 2020

Aren't those sites also broken in Firefox & Safari? Or are you more concerned about Chrome only content?

I suspect but have not verified these sites are also broken in Firefox and Safari, if they require user gesture for all Clipboard reads. I only discussed Chrome content because the question was regarding breakage in Chrome, and I only had public use information for Chrome, like chromestatus feature use data. Please share information about breakage in Firefox & Safari, if possible, to provide more color for this conversation. Sorry, I'm not well acquainted with available public data for Firefox & Safari.

Safari does not collect such data either. Given Safari always requires user gesture to paste, it's pretty safe to assume such websites are broken in Safari. If those websites are broken in Safari, on the other hand, it means the website has some Chrome/Chromium specific behavior. Even in such a scenario, this will likely remain Chrome/Chromium only permissions so the two-implementation requirement means that this permission should not be added back to the spec.

@marcoscaceres
Copy link
Member

Ok, I'm going to go ahead and merge this, as the two engine requirement hasn't been met for this feature.

@marcoscaceres marcoscaceres merged commit af4ce03 into master Oct 29, 2020
@marcoscaceres marcoscaceres deleted the no-read-permission branch October 29, 2020 00:58
saschanaz added a commit to saschanaz/permissions that referenced this pull request Dec 18, 2020
marcoscaceres pushed a commit to w3c/permissions that referenced this pull request Apr 20, 2021
foolip added a commit to foolip/browser-compat-data that referenced this pull request Jul 4, 2024
ClipboardEvent is part of the older API:
https://w3c.github.io/clipboard-apis/#clipboard-event-api

The "clipboard-read" permission was removed from the spec:
w3c/clipboard-apis#132
foolip added a commit to mdn/browser-compat-data that referenced this pull request Jul 9, 2024
The "clipboard-read" permission was removed from the spec:
w3c/clipboard-apis#132
ddbeck pushed a commit to mdn/browser-compat-data that referenced this pull request Jul 9, 2024
ClipboardEvent is part of the older API:
https://w3c.github.io/clipboard-apis/#clipboard-event-api

The "clipboard-read" permission was removed from the spec:
w3c/clipboard-apis#132
ddbeck pushed a commit to mdn/browser-compat-data that referenced this pull request Jul 9, 2024
The "clipboard-read" permission was removed from the spec:
w3c/clipboard-apis#132
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is "clipboard" permission replaced by "clipboard-read" and "clipboard-write"?
5 participants