-
Notifications
You must be signed in to change notification settings - Fork 36
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
Should clipboard-write permission be removed too? #163
Comments
Oh, actually w3c/permissions#246 already removed clipboard-write. I'll open a PR then. |
A change like this should be discussed in the Web Editing WG before it can be made. Given its use in Chromium I doubt we will reach consensus on its removal. |
I'm updating the MDN Clipboard API docs to reflect the current state of play. The situation is confusing. Could I get confirmation/denial of the following:
Given the removed permissions, I'm not sure what is expected by the spec/spec team. |
As a developer of a web application that is often used inside an iframe, the behavior in Safari and Firefox where clipboard writes require a user gesture, but do not require |
Adding @evanstade and @inexorabletash to comment on this. I'm not sure if we can remove the clipboard read/write permissions as removing those permissions would break the chrome remote desktop clipboard sync scenarios. Note that a recent change was made in Chromium to allow web authors to access clipboard within the copy/paste event handler, so that might work for your use case @robertknight ? |
Our use cases generally look like the MDN example where a clipboard API to write text or HTML is called when a button is clicked. For context our app is an annotation / commenting tool for HTML / PDF and there are buttons to copy comments to the clipboard, so they can be easily pasted into a document or spreadsheet. I tried the latest Chrome Canary release and it seems that iframes still need the |
@robertknight Since this question is specific to Chromium, please open a crbug and let's discuss with Chromium folks there. |
Still seems like a good chance to discuss about this, though. Are there known use cases other than clipboard sync that need those permissions, that the aforementioned chromium change can't deal with? Should the implementations show an extra icon somewhere as browsers do with audio and video record? |
Chromium is making a change in this space soon: https://chromestatus.com/feature/5167870134976512 However, a generic user gesture/activation will still not be enough to write to the clipboard beyond plain text. What types does your app attempt to write? Perhaps there is an argument to extend the plain text behavior to all built-in types.
This is what Chromium does, however cross-origin iframes don't get to request permissions (some? all? not sure). |
Plain text and HTML. Extending the change to HTML would be helpful as it could avoid situations where some copy-to-clipboard functionality in the app works, but some does not, if a third-party embedding us hasn't added the |
w3c/permissions#175 (comment) from @rniwa:
And I think Mozilla also have no intention to implement that. (cc @mbrodesser, @annevk)
The text was updated successfully, but these errors were encountered: