-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Add test for event propagation on disabled form controls #32381
base: master
Are you sure you want to change the base?
Conversation
d329515
to
ef0f04c
Compare
Currently this semi-matches Safari. Chrome seems to not be generating |
ef0f04c
to
f6639da
Compare
All of the tests fail in all browsers, is that expected? Isn't the behavior of some browser sensible enough to align on? |
@saschanaz might be better to answer that question |
But Chrome seems to special case disabled form controls to not get a click event, whereas per the test results, Firefox and Safari don't give any mouse events on those controls. I think there are some further differences between Firefox and Safari, but I've forgotten exactly what they are. (I'm going to close and reopen to update the results in case browsers changed since the test was written). |
https://wpt.fyi/results/html/semantics/forms/event-propagate-disabled.html?label=pr_head&max-count=1&pr=32381 is now CRASH in Safari, but still all failing in Chrome and Firefox, so probably the same situation still. |
Chrome does bubble clicks, please check whether you enabled Experimental Web Platform features flag as the flag blocks bubbling. Demo:
(See also whatwg/html#2368 (comment)) |
Yeah, we're running this in Chrome dev with the flag set; it sounds like Chrome release might pass the tests as written? Do you happen to know why the experimental flag is blocking (just) click events in this case? |
I have no idea, they once wanted to align with Firefox perhaps? |
That "SendMouseEventsDisabledFormControls" feature was added in https://source.chromium.org/chromium/chromium/src/+/af6f27363128a72a89cb581f3073c0e068854308 but was never moved out of experimental. I've run the test locally with Per https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#enabling-and-disabling-form-controls:-the-disabled-attribute only the "click" event should be dropped, so maybe the per-spec behavior is what Chrome does with "SendMouseEventsDisabledFormControls" enabled is correct, and the test should match that? |
f6639da
to
74eae5c
Compare
Well I've updated it a bit, but I'm still not sure what behaviour we actually want to align on. In particular Chrome is still failing the tests for |
74eae5c
to
9e2b476
Compare
Thanks for making this test! It looks quite comprehensive with bubbling and child elements. Do you think it would be possible to also test mousemove, pointerdown, pointerup, and pointermove? |
Would it also be possible to look at |
Added it. For now it just includes all nodes as Blink/WebKit do, only to not complicate things before we know what should be done there. I'll adjust it based on the consensus from the next triage meeting. |
I added some more tests for internal request. Short report:
Haven't tested on Safari yet. |
Note that https://wpt.fyi/results/html/semantics/forms?label=pr_head&max-count=1&pr=32381 has the latest results for the PR, including in Safari. |
(The current assertions, especially in the new tests (-immediate and -by-parent) are not exactly the requirements. I'll adjust them as we better understand what should be done, hopefully after the triage. For now they are to show the differences.) |
Filed w3c/pointerevents#454. |
Corresponds to the latest consensus and also matches what Chrome shipped behind `--enable-blink-features=SendMouseEventsDisabledFormControls`. Imported the portion of tests that is directly impacted here from #32381. Others are not directly impacted and thus I'd like to land them separately since there are still some mismatching behavior around `button` element. Differential Revision: https://phabricator.services.mozilla.com/D161537 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1799565 gecko-commit: dc3970db7ae2ad12db0cfb4ff794fa1f974a74e3 gecko-reviewers: smaug
…ly r=smaug Corresponds to the latest consensus and also matches what Chrome shipped behind `--enable-blink-features=SendMouseEventsDisabledFormControls`. Imported the portion of tests that is directly impacted here from web-platform-tests/wpt#32381. Others are not directly impacted and thus I'd like to land them separately since there are still some mismatching behavior around `button` element. Differential Revision: https://phabricator.services.mozilla.com/D161537
Corresponds to the latest consensus and also matches what Chrome shipped behind `--enable-blink-features=SendMouseEventsDisabledFormControls`. Imported the portion of tests that is directly impacted here from #32381. Others are not directly impacted and thus I'd like to land them separately since there are still some mismatching behavior around `button` element. Differential Revision: https://phabricator.services.mozilla.com/D161537 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1799565 gecko-commit: 0f30447455dcbf2c99259f763a443f79fa521757 gecko-reviewers: smaug
…ly r=smaug Corresponds to the latest consensus and also matches what Chrome shipped behind `--enable-blink-features=SendMouseEventsDisabledFormControls`. Imported the portion of tests that is directly impacted here from web-platform-tests/wpt#32381. Others are not directly impacted and thus I'd like to land them separately since there are still some mismatching behavior around `button` element. Differential Revision: https://phabricator.services.mozilla.com/D161537
…ly r=smaug Corresponds to the latest consensus and also matches what Chrome shipped behind `--enable-blink-features=SendMouseEventsDisabledFormControls`. Imported the portion of tests that is directly impacted here from web-platform-tests/wpt#32381. Others are not directly impacted and thus I'd like to land them separately since there are still some mismatching behavior around `button` element. Differential Revision: https://phabricator.services.mozilla.com/D161537
Corresponds to the latest consensus and also matches what Chrome shipped behind `--enable-blink-features=SendMouseEventsDisabledFormControls`. Imported the portion of tests that is directly impacted here from #32381. Others are not directly impacted and thus I'd like to land them separately since there are still some mismatching behavior around `button` element. Differential Revision: https://phabricator.services.mozilla.com/D161537 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1799565 gecko-commit: 0f30447455dcbf2c99259f763a443f79fa521757 gecko-reviewers: smaug
…ly r=smaug Corresponds to the latest consensus and also matches what Chrome shipped behind `--enable-blink-features=SendMouseEventsDisabledFormControls`. Imported the portion of tests that is directly impacted here from web-platform-tests/wpt#32381. Others are not directly impacted and thus I'd like to land them separately since there are still some mismatching behavior around `button` element. Differential Revision: https://phabricator.services.mozilla.com/D161537
No description provided.