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

Allow clipboard permissions in editor iframe #75082

Merged
merged 1 commit into from
Mar 30, 2023

Conversation

kevin940726
Copy link
Contributor

Related to #74542

Proposed Changes

Add clipboard-read and clipboard-write to the allow list of the editor iframe. Right now, only clipboard-read is required for #74542, but we might want to add more features related to the clipboard in the future, so I also added clipboard-write.

Note that adding them to the allow list doesn't automatically grant these permissions for the users, Users still have to explicitly allow them when asked. Without the allow list, users won't be asked at all (for cross-origin iframes).

Testing Instructions

I'm not sure how to test it, unfortunately. But #74542 should contain the necessary steps to test it.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-ajp-p2)?

Copy link
Contributor

@mattwiebe mattwiebe left a comment

Choose a reason for hiding this comment

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

I can confirm that this allows clipboard permissions to function properly in that permission is requested by Chrome and copy and paste works properly after that.

@kevin940726 kevin940726 merged commit 45e3d7a into trunk Mar 30, 2023
@kevin940726 kevin940726 deleted the fix/clipboard-permissions branch March 30, 2023 02:20
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.

3 participants