Skip to content

Skip parts of form submission when the method is dialog - #8943

Merged
annevk merged 1 commit into
mainfrom
annevk/submit-dialog
Mar 6, 2023
Merged

annevk merged 1 commit into
mainfrom
annevk/submit-dialog

Conversation

@annevk

@annevk annevk commented Feb 24, 2023 •

Copy link
Copy Markdown
Member

Also refactor "submit dialog", "close the dialog", and their callers.

Note that removing the open attribute check is safe as "close the dialog" also handles that.

Tests: web-platform-tests/wpt#38819

Fixes #8499.

(See WHATWG Working Mode: Changes for more details.)


/form-control-infrastructure.html ( diff )
/interactive-elements.html ( diff )

Also refactor "submit dialog", "close the dialog", and their callers.

Note that removing the open attribute check is safe as "close the dialog" also handles that.

Tests: ...

Fixes #8499.
@annevk
annevk requested review from domenic and nt1m February 24, 2023 10:29
Comment thread source
data-x="dom-dialog-close">close(<var>returnValue</var>)</code></dfn> method steps are:

<ol>
<li><p>If <var>returnValue</var> is not given, then set it to null.</p></li>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we do "set it to" or "let it be" in these sorts of situations... Or sidestep the question altogether by declaring a second variable.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen both I think. I guess the idea is that if it's not given it hasn't been initialized yet and is not initialized to undefined? I would be okay with documenting "set it to" in Infra. I personally like that better.

@domenic domenic added topic: dialog The dialog element, modal dialogs and how they close needs tests Moving the issue forward requires someone to write tests labels Feb 27, 2023
annevk added a commit to web-platform-tests/wpt that referenced this pull request Mar 5, 2023
@annevk annevk removed the needs tests Moving the issue forward requires someone to write tests label Mar 5, 2023
@annevk

annevk commented Mar 5, 2023

Copy link
Copy Markdown
Member Author

I wrote tests and updated OP.

annevk added a commit to web-platform-tests/wpt that referenced this pull request Mar 6, 2023
@annevk
annevk merged commit e150a14 into main Mar 6, 2023
@annevk
annevk deleted the annevk/submit-dialog branch March 6, 2023 02:56
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Mar 7, 2023
Automatic update from web-platform-tests
HTML: dialog form submission

For whatwg/html#8943.
--

wpt-commits: bcaa9ec9eddd784b4cc90eb7ecb5c68dfd56a085
wpt-pr: 38819
marcoscaceres pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 28, 2023
aosmond pushed a commit to aosmond/gecko that referenced this pull request May 18, 2023
Automatic update from web-platform-tests
HTML: dialog form submission

For whatwg/html#8943.
--

wpt-commits: bcaa9ec9eddd784b4cc90eb7ecb5c68dfd56a085
wpt-pr: 38819
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jul 18, 2023
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Jul 21, 2023
…. r=dom-core,sefeng

whatwg/html#8943 moved dialog submission in the form submission algorithm from step 24 to step 11.

Differential Revision: https://phabricator.services.mozilla.com/D183168

UltraBlame original commit: bcffaa369c722f4ebfa7cb8af6a3fc605e2efa10
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Jul 21, 2023
…. r=dom-core,sefeng

whatwg/html#8943 moved dialog submission in the form submission algorithm from step 24 to step 11.

Differential Revision: https://phabricator.services.mozilla.com/D183168

UltraBlame original commit: bcffaa369c722f4ebfa7cb8af6a3fc605e2efa10
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Jul 21, 2023
…. r=dom-core,sefeng

whatwg/html#8943 moved dialog submission in the form submission algorithm from step 24 to step 11.

Differential Revision: https://phabricator.services.mozilla.com/D183168

UltraBlame original commit: bcffaa369c722f4ebfa7cb8af6a3fc605e2efa10
jwidar pushed a commit to jwidar/LatencyZeroGithub that referenced this pull request Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

normative change topic: dialog The dialog element, modal dialogs and how they close

Development

Successfully merging this pull request may close these issues.

<form method="dialog"> should probably not check for noopener

2 participants