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

[lexical-website] Bug Fix: add allow-popups-to-escape-sandbox to iframe sandbox flags #5988

Merged

Conversation

etrepum
Copy link
Contributor

@etrepum etrepum commented Apr 29, 2024

Description

When playing with the examples on the website, clicking the "Fork on StackBlitz" button previously opened a blocked popup. With this sandbox flag, the popup loads without being blocked by cross-origin-opener-policy. Can reproduce with Chrome, Firefox and Safari on mac.

Test plan

Before

  • Start an example from the homepage by clicking "Run Project" and then "Fork on StackBlitz"
  • The pop-up will be blocked

After

  • Start an example from the preview site by clicking "Run Project" and then "Fork on StackBlitz"
  • The pop-up will not be blocked

Copy link

vercel bot commented Apr 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 29, 2024 7:25pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 29, 2024 7:25pm

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 29, 2024
@etrepum etrepum marked this pull request as ready for review April 29, 2024 19:25
@@ -28,5 +28,5 @@ Once this is done, Lexical will replace all ParagraphNode instances with CustomP
style="width:100%; height:700px; border:0; border-radius:4px; overflow:hidden;"
title="lexical-collapsible-container-plugin-example"
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts"
Copy link
Contributor

Choose a reason for hiding this comment

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

cool didnt know about this flag

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Me either, until I saw someone run into the bug on discord and then followed the trail 😅

Copy link
Contributor

@StyleT StyleT left a comment

Choose a reason for hiding this comment

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

Nice!

@StyleT StyleT merged commit fdce31d into facebook:main May 2, 2024
5 checks passed
@etrepum etrepum deleted the fix-stackblitz-allow-popups-to-escape-sandbox branch May 11, 2024 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants