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

🐛 form submission invalid in playground #10788

Closed
hanyujie2002 opened this issue Mar 21, 2024 · 5 comments
Closed

🐛 form submission invalid in playground #10788

hanyujie2002 opened this issue Mar 21, 2024 · 5 comments
Labels
needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.

Comments

@hanyujie2002
Copy link
Contributor

MDN URL

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog#handling_the_return_value_from_the_dialog

What specific section or headline is this issue about?

#handling_the_return_value_from_the_dialog

What information was incorrect, unhelpful, or incomplete?

When the example EmbedLiveSample("Handling the return value from the dialog") be played in playground, the cancel button is invalid.

image

However, the button is valid when the example is directly played in mdn

image

What did you expect to see?

The cancel button is valid when playing the example in playground

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

No response

Do you have anything more you want to share?

No response

@hanyujie2002 hanyujie2002 added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Mar 21, 2024
@hanyujie2002
Copy link
Contributor Author

Finally I get the point. The browser console warns me "Blocked form submission to '' because the form's frame is sandboxed and the 'allow-forms' permission is not set."

image

Due to the sandbox property of <iframe> only include allow-scripts and allow-same-origin in the playground and don't have allow-forms, the form action is forbidden.

image

Is there any way to add allow-forms to the <iframe>?

Slightly ping @yin1999

@hanyujie2002
Copy link
Contributor Author

Or due to security concern it's intentionally done in like this way?

@hanyujie2002 hanyujie2002 changed the title 🐛 cancel button invalid in EmbedLiveSample("Handling the return value from the dialog") 🐛 form submission invalid in playground Mar 26, 2024
@hanyujie2002
Copy link
Contributor Author

Maybe its better to move this issue to yari 🤔

@yin1999
Copy link
Member

yin1999 commented Mar 26, 2024

/cc @bsmth Could you transfer this :)

@bsmth bsmth transferred this issue from mdn/content Mar 26, 2024
@bsmth
Copy link
Member

bsmth commented Mar 26, 2024

/cc @bsmth Could you transfer this :)

Sure thing, let's see what eng has to say

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.
Projects
None yet
Development

No branches or pull requests

3 participants