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
{{ message }}
Repository navigation
<form method="dialog"> should probably not check for noopener #8499
topic: dialogThe dialog element, modal dialogs and how they closetopic: formsForms and form controls: input types, submission, constraint validation and autofill
I think it probably makes sense to skip to the dialog steps earlier, before we even do any navigation checks, given form[method=dialog] does not involve any navigation.
So currently <form method=dialog rel=noopener> fails to submit (due to an early return) and with this change it would succeed (or at least continue beyond that point). Seems reasonable to me for the reason you state.
Edit: this analysis was incorrect. The problem is that we end up creating a top-level navigable we don't need.
topic: dialogThe dialog element, modal dialogs and how they closetopic: formsForms and form controls: input types, submission, constraint validation and autofill
Activity
nt1m commentedon Nov 14, 2022
cc @whatwg/forms too
annevk commentedon Nov 14, 2022
So currently<form method=dialog rel=noopener>fails to submit (due to an early return) and with this change it would succeed (or at least continue beyond that point). Seems reasonable to me for the reason you state.Edit: this analysis was incorrect. The problem is that we end up creating a top-level navigable we don't need.
domenic commentedon Nov 16, 2022
Seems good to me. So this would consist of moving what is currently steps 16 and 23 up to after step 9, I think? That is, we still want to:
But we do not want to:
Would you be up for writing a spec PR and tests PR covering these?
annevk commentedon Nov 16, 2022
Presumably we just have to move
up? Makes sense to ignore action parsing as well. (Ideally we'd not have "jump", but that's a bit more effort.)
domenic commentedon Nov 16, 2022
Right, that's step 23; step 16 is establishing the value of method.
smaug---- commentedon Nov 16, 2022
@sefeng211
josepharhar commentedon Dec 8, 2022
Sounds good to me. Based on what I'm reading in chromium it seems like this is what we are already doing.
The check for method=dialog comes before what I believe is the check for the target navigable.
smaug---- commentedon Jan 30, 2023
Looks reasonable. @avandolder
avandolder commentedon Jan 30, 2023
Yeah, this should also line up with how Gecko already handles submissions - we check for dialog before handling rel values.
Skip parts of form submission when the method is dialog
annevk commentedon Mar 5, 2023
FYI, I ended up finding a "bug" in Gecko. It takes the form's action into account. Bug linked from the PR.
Skip parts of form submission when the method is dialog