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

@page/page-orientation example doesn't print, lacks "allow-modal" #12387

Closed
Tracked by #38232
goldnate opened this issue Sep 30, 2024 · 4 comments
Closed
Tracked by #38232

@page/page-orientation example doesn't print, lacks "allow-modal" #12387

goldnate opened this issue Sep 30, 2024 · 4 comments
Labels
🐛 bug Something isn't working, or isn't working as expected plus:playground

Comments

@goldnate
Copy link

MDN URL

https://developer.mozilla.org/en-US/docs/Web/CSS/@page/page-orientation

What specific section or headline is this issue about?

Example

What information was incorrect, unhelpful, or incomplete?

I wanted to see how it would print because I was confused about the sentence, "After a page is laid out, the page must be displayed rotated a quarter turn to the left (counter-clockwise)" in the description of rotate-left. Does that mean that the content must somehow be laid out sideways and then turned so that it appears correctly? Also, does that mean that the top and bottom margins indicated for the page become left and right when related to the content? I just wasn't sure so I wanted to print the example.

What did you expect to see?

I expected my browser (Firefox 130.1 (64-bit) on Windows 11 Pro v. 23H2) open up the print dialog or for a PDF of the example to download. Neither happened. Nothing happened. It looks like window.print just doesn't do anything from inside the sandbox.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@goldnate goldnate added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Sep 30, 2024
@Josh-Cena Josh-Cena changed the title for @page page-orientation example doesn't print, so can't see the example. @page/page-orientation example doesn't print, so can't see the example. Oct 1, 2024
@Josh-Cena Josh-Cena added good first issue A good issue for newcomers to get started with. and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. good first issue A good issue for newcomers to get started with. labels Oct 1, 2024
@Josh-Cena
Copy link
Member

This is because the live sample iframe does not have sandbox="allow-modals" set. I'm not sure if it's a great idea to set it unconditionally in Yari, but #11460 is highly related.

cc @mdn/core-dev

@Josh-Cena Josh-Cena changed the title @page/page-orientation example doesn't print, so can't see the example. @page/page-orientation example doesn't print, lacks "allow-modal" Oct 1, 2024
@fernandoroa
Copy link

I couldn't make it work on the playground not modifying the code to run it locally.

@bsmth
Copy link
Member

bsmth commented Feb 20, 2025

Thanks for reporting, this is fixed in the following PR which has more information on occurrences and the changes that permit this in examples:

@bsmth bsmth closed this as completed Feb 20, 2025
@goldnate
Copy link
Author

Thank you for this and for everything you do to make MDN such a valuable resource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working, or isn't working as expected plus:playground
Projects
None yet
Development

No branches or pull requests

5 participants