yari icon indicating copy to clipboard operation
yari copied to clipboard

fix(sandbox): add `allow-forms` so <dialog /> element could work properly

Open hanyujie2002 opened this issue 1 year ago • 2 comments

Summary

Fixes #11692 Fixes #11460

Problem

<dialog /> element doesn't work as expected in example of https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog#html-only_dialog. With chrome console, Blocked form submission to '' because the form's frame is sandboxed and the 'allow-forms' permission is not set. is reported.

Solution

I add allow-forms to the sandbox in embed live example file.


Before

After


hanyujie2002 avatar Aug 26 '24 14:08 hanyujie2002

P.S. Five months ago I met and fixed a similar problem in playground https://github.com/mdn/yari/issues/10788

hanyujie2002 avatar Aug 26 '24 14:08 hanyujie2002

image

I am not sure if I should update the test code as well

hanyujie2002 avatar Aug 26 '24 14:08 hanyujie2002

fixed in https://github.com/mdn/rari/commit/dd5ac867f5ffc55793ccc0837ec6f11282c6fa78

Thank you 🙏

fiji-flo avatar Feb 20 '25 10:02 fiji-flo