Closed Bug 1365396 Opened 8 years ago Closed 5 years ago

Submit events should not be fired by dispatching a click event on a disconnected form

Categories

(Core :: DOM: Forms, enhancement, P3)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1402292

People

(Reporter: d, Unassigned)

Details

Attachments

(1 file)

I am guessing this is blocked by bug 329509 ... am I right?
Flags: needinfo?(jjong)
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #1) > I am guessing this is blocked by bug 329509 ... am I right? I don't think so, we're just not blocking the submit when form is disconnected [1]. I can help with this. [1] http://searchfox.org/mozilla-central/rev/6c2dbacbba1d58b8679cee700fd0a54189e0cf1b/dom/html/HTMLFormElement.cpp#2015-2017
Assignee: nobody → jjong
Flags: needinfo?(jjong)
Attached patch patch, v1. (deleted) — Splinter Review
Comment on attachment 8870694 [details] [diff] [review] patch, v1. Hi bz, do you know why this check was not added in the first place?
Flags: needinfo?(bzbarsky)
Well, the spec didn't use to say to do a check at all. It was a recent spec change in https://github.com/whatwg/html/pull/1383 Note that there is an outstanding spec issue on doing the check both where the spec says to today and where we actually do it right now; see https://github.com/whatwg/html/issues/2708
Flags: needinfo?(bzbarsky)
Oh, and as far as the patch goes... step 2 in https://html.spec.whatwg.org/multipage/forms.html#concept-form-submit hasn't changed, really (because the abovementioned spec change was messed up; see <https://github.com/whatwg/html/issues/2708#issuecomment-304029649>). So we're still not doing the checks it says to do, with or without this patch, and the comment about how we're not actually doing what the spec says should stay. Given https://github.com/whatwg/html/issues/2615 and https://bugs.chromium.org/p/chromium/issues/detail?id=653692 it's not clear to me that we want to be making any changes here at all for the moment. If we _do_ make any changes, we better test them against CloudPrint.
After further discussion, I think I filed this bug prematurely. We are still in discussion as to whether form should have a connected check in https://github.com/whatwg/html/issues/2615, because we want to consistify it with <a>/<area>, and Chrome is unsure yet if they're willing to do that, pending use-counter data. So it's probably best to hold off on changes; there's a chance (although hopefully small) that it will end up being wasted effort. I will ping this bug again when it is "safe" to change (i.e. definitely own't be wasted effort). Apologies about this.
Thanks bz and Domenic for the input. Let's wait till we reach a consensus then.
Looks like https://github.com/whatwg/html/issues/2615 was getting close to agreement a few weeks ago.
Priority: -- → P3
Assignee: jessi3py → nobody
Yeah, sorry about that; I never updated folks when this settled down. We have a spec now. There is a connected check in step 1 and step 6.3 for form. Tests available at http://w3c-test.org/html/semantics/forms/form-submission-0/submission-checks.window.html.

Per comment 10, mark it duplicates to bug 1402292.

Status: NEW → RESOLVED
Type: defect → enhancement
Closed: 5 years ago
Component: DOM: Core & HTML → DOM: Forms
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: