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

PDFs won't render in Chrome #1314

Open
bgrgicak opened this issue Apr 24, 2024 · 0 comments
Open

PDFs won't render in Chrome #1314

bgrgicak opened this issue Apr 24, 2024 · 0 comments
Labels
[Aspect] Website [Package][@wp-playground] Remote [Type] Bug An existing feature does not function as intended

Comments

@bgrgicak
Copy link
Collaborator

In #1298 we enabled PDF loading in Playground, but it still didn't allow PDF previews in Chrome while it works in Firefox (try this blueprint).

It turns out that any sandbox attribute on iframes will block PDFs from loading. I couldn't find any documentation on it but a comment from StackOverflow suggests the same.

There is a note in the MDN documentation about embedded documents: it is strongly discouraged to use both allow-scripts and allow-same-origin, as that lets the embedded document remove the sandbox attribute. I assume that Chrome does something different.

We explored removing the sandbox attribute in #1313 but decided that it's not worth the risk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Aspect] Website [Package][@wp-playground] Remote [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

1 participant