-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<a>, <area>, <link>, and <form> behavior #2615
Comments
The forms tests would end up closing web-platform-tests/wpt#3109 it looks like. |
Simple tests for #3109 and whatwg/html#2615.
I created web-platform-tests/wpt#5761 to test |
What I'm seeing is that in Firefox the
We could, of course, convert those two "throw"s in steps 3 and 4 to the "no-op and return" behavior. |
I just want to say I agree with the overall mission here of creating a uniform check that is reused across all these elements. Presumably via a shared algorithm. |
Okay, so I think it's non-controversial to require their node document to be fully active (and we should probably not throw given that's what most do). The only other bit that only Firefox currently enforces is that the element is connected (inserted into the document or one of its shadow trees). Chrome enforces that just for In Edge (15) I get a whole bunch of exceptions leading me to suspect that whatever we do is compatible there. My proposal is that we align with Firefox, except turning the exceptions into a no-op. Would be good to hear from Apple and Google on that though. |
Require that they are all connected to a document that is fully active. There is enough difference between implementations that this appears to be web compatible. Tests: * web-platform-tests/wpt#5758 * web-platform-tests/wpt#5759 * web-platform-tests/wpt#5761 Fixes #2615.
Note https://bugzilla.mozilla.org/show_bug.cgi?id=1218456 which claims this is a somewhat annoying behavior on the part of Firefox, at least for some use cases. I, too, would like to hear from Apple and Google here. |
I think the right people to ping are dtapuska and cdumez but I've kind of lost the thread on what the sum behavior changes being proposed are for each browser. and in what threads they've ended up in. So I'll hold off on pinging them myself and leave that to you, @annevk, so your ping message can include a summary for them. |
That summary is in #2615 (comment). |
But isn't there something about |
@dtapuska how would you feel about making Chrome enforce that |
I don't think Chrome has any notion of connected for I have encountered a few sites doing exact this download pattern in the past. I'd ideally like to gather some metrics of the impact of making the connected-ness change for area and anchor. I can confirm chrome has the connected-ness check for |
@dtapuska sounds reasonable. When can you report back on those metrics? As for |
(FWIW, @bzbarsky, if you don't care about the connectedness, I'd be happy with not requiring that too (though we need to decide if |
Yes, agreed on the "fully active" bit. Pinging @smaug---- for the connectedness issue. |
My test was flawed because I reused names. It's now fixed. @smaug---- thoughts on https://bugzilla.mozilla.org/show_bug.cgi?id=1218456 and no longer requiring I actually think I'd prefer not requiring being connected (though we should then probably not require it for |
Per #whatwg IRC discussion @smaug---- would prefer it if @dtapuska gathered data on making the connected change in Chrome. |
I've added the change today... It will be 6-8 weeks before we get actionable data though. |
There is some debate whether area and anchors should be connected for click to be handled. See whatwg/html#2615 (comment) This is a data gathering attempt. BUG= Review-Url: https://codereview.chromium.org/2861633004 Cr-Commit-Position: refs/heads/master@{#469699}
Require that they are all connected to a document that is fully active. There is enough difference between implementations that this appears to be web compatible. Tests: * web-platform-tests/wpt#5758 * web-platform-tests/wpt#5759 * web-platform-tests/wpt#5761 Fixes #2615.
Chrome's connectedness check appears to happen in the wrong place, after the submit event is already dispatched.... I'm working on tests for that as part of web-platform-tests/wpt#5878 and will file issues. |
#2708 (comment) pointed out that this check was just broken, so this fixes it. But the check is also under discussion in #2615 and #2708, pending compat data, so this adds a warning in the meantime.
#2708 (comment) pointed out that this check was just broken, so this fixes it. But the check is also under discussion in #2615 and #2708, pending compat data, so this adds a warning in the meantime.
@dtapuska I can't find AnchorClickDispatchForNonConnectedNode in chromestatus.com, 6 weeks later... any ideas? |
Managed to find the data; it's still internal as it threads its way through canary/beta channels. It isn't looking promising, i.e. a decent portion of people are triggering clicks on disconnected anchors. But we want to wait on making a final determination until we get broader visibility of the metric on the stable channel, which will occur in early August. Re-setting my calendar reminder for then :) |
I don't know if the counter has reached stable yet, but https://www.chromestatus.com/metrics/feature/timeline/popularity/1971 exists and the latest is: |
That doesn't look good at all. So I think a elements should not get the connected check. So per the general idea of this thread, maybe we should remove it from form and area as well? |
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/5311 Gecko/Chromium don't navigate, WebKit and EdgeHTML do. Is the connectedness check for |
Chromium changed to align with Gecko iirc. |
This comes from from Google Chrome Stable channel, and we can evaluate it.
That's right. IMO, navigation by disconnected elements is weird. So I prefer limiting the weird behavior only to |
I'm happy with just allowing it on |
Hmm, I liked the idea of everything being consistent, even if it means allowing navigation everywhere. But I don't care much. Let's also remember to fix #2708, one way or another. |
Require that they are all connected to a document that is fully active. There is enough difference between implementations that this appears to be web compatible. Tests: * web-platform-tests/wpt#5758 * web-platform-tests/wpt#5759 * web-platform-tests/wpt#5761 Fixes #2615.
Simple tests for #3109 and whatwg/html#2615.
Simple tests for web-platform-tests#3109 and whatwg/html#2615.
Simple tests for web-platform-tests#3109 and whatwg/html#2615.
whatwg#2708 (comment) pointed out that this check was just broken, so this fixes it. But the check is also under discussion in whatwg#2615 and whatwg#2708, pending compat data, so this adds a warning in the meantime.
Require that they are all connected to a document (except for <a>) that is fully active (including <a>). There is enough difference between implementations that this appears to be web compatible. Also perform a second connected check for <form>. Tests: * web-platform-tests/wpt#5758 * web-platform-tests/wpt#5759 * web-platform-tests/wpt#5761 Fixes whatwg#2615 and fixes whatwg#2708.
In #1381 we made
<form>
check that it's connected to a document before it can navigate.We don't have such a check for
<a>
,<area>
, and<link>
. (It does seem per tests below that Firefox requires these to be connected as well, or at least<a>
.)On the other hand, it seems we don't have a requirement for
<form>
to be in a document that's fully active. It just needs to have a browsing context.This mismatch doesn't make sense. Ideally all these elements have the same checks (apart from the sandboxing check that only applies to
<form>
).Related tests:
I still need to write tests for
<form>
.cc @tkent-google @bzbarsky @cdumez
The text was updated successfully, but these errors were encountered: