You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What specific section or headline is this issue about?
'Result' (i.e. the runnable code sample)
What information was incorrect, unhelpful, or incomplete?
In the "Examples" section, it reads:
The following example displays a button to open a containing a form via the showModal() method. The script assigns the returnValue an initial value of initialValue. The confirm button (confirmBtn) submits the form with validation and the "X" button submits the form without validation. Submitting a form with a method="dialog" closes the dialog and sets the return value to the value, if any, of the button or input elements of type=submit.
When I click the button from the runnable code sample, the dialog opens, but clicking either the "X" button, or the "Confirm" button fails to close the dialog. Also, the returnValue property of the dialog appears not to be changed when clicking the "Confirm" button.
What did you expect to see?
I expected the dialog to close after clicking either the "X" or the "Confirm" button, and I expected the code sample to print the dialog's "returnValue" property to indicate it changed due to clicking the "Confirm" button.
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
I tested on windows 11 pro with
firefox 131.0.3 (64-bit)
google chrome 130.0.6723.70 (Official Build) (64-bit)
microsoft edge 130.0.2849.52 (Official build) (64-bit)
In the console of chrome and edge, I see this error message:
Blocked form submission to '' because the form's frame is sandboxed and the 'allow-forms' permission is not set.
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/returnValue
What specific section or headline is this issue about?
'Result' (i.e. the runnable code sample)
What information was incorrect, unhelpful, or incomplete?
In the "Examples" section, it reads:
When I click the button from the runnable code sample, the dialog opens, but clicking either the "X" button, or the "Confirm" button fails to close the dialog. Also, the returnValue property of the dialog appears not to be changed when clicking the "Confirm" button.
What did you expect to see?
I expected the dialog to close after clicking either the "X" or the "Confirm" button, and I expected the code sample to print the dialog's "returnValue" property to indicate it changed due to clicking the "Confirm" button.
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
I tested on windows 11 pro with
In the console of chrome and edge, I see this error message:
Blocked form submission to '' because the form's frame is sandboxed and the 'allow-forms' permission is not set.
MDN metadata
Page report details
en-us/web/api/htmldialogelement/returnvalue
The text was updated successfully, but these errors were encountered: