Closed Bug 1796696 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 36578 - Stop click/mouseup/mousedown propagation at disabled form parents

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 36578 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/36578
Details from upstream follow.

Joey Arhar <jarhar@chromium.org> wrote:

Stop click/mouseup/mousedown propagation at disabled form parents

This patch makes click, mousedown, and mouseup events have their event
paths never include any disabled form controls or ancestors of disabled
form controls.

The existing behavior is to skip propagation completely for all
MouseEvents if they are targeted at a disabled form control, and to skip
disabled form controls in the event path of MouseEvents. This leads to
weird behavior where having a child element of a disabled button made
the event propagate up past the disabled button, and made events
propagate up past disabled input elements because MouseEvents get
targeted at the input's ShadowDOM children.

This behavior is the most popular option in this whatwg/html thread:
https://github.com/whatwg/html/issues/5886

This patch should only affect the behavior when the experimental flag
SendMouseEventsDisabledFormControls is enabled, which is still
experimental. I plan on finching this out slowly since I believe it may
break websites.

Bug: 588760, 693521, 1115661, 1116161, 1245511, 1061240
Change-Id: Ibf722362f52d5e51513663607d45f849d0c3bc64
Reviewed-on: https://chromium-review.googlesource.com/3929060
WPT-Export-Revision: 0db7c3fe4c68f143ffd38d52e2084b1e9c7620d6

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 10 subtests

Status Summary

Firefox

OK : 1
PASS : 6
FAIL : 4

Chrome

PASS : 9
FAIL : 1
ERROR: 1

Safari

PASS : 6
FAIL : 4
ERROR: 1

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /html/semantics/disabled-elements/disabled-event-dispatch.tentative.html [wpt.fyi]
    • Testing pointerdown events when clicking child of disabled form controls.: FAIL (Chrome: PASS, Safari: FAIL)
    • Testing pointerdown events when clicking disabled form controls.: FAIL (Chrome: PASS, Safari: FAIL)
    • Testing pointerup events when clicking child of disabled form controls.: FAIL (Chrome: PASS, Safari: FAIL)
    • Testing pointerup events when clicking disabled form controls.: FAIL (Chrome: PASS, Safari: FAIL)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f26eac133c3b [wpt PR 36578] - Stop click/mouseup/mousedown propagation at disabled form parents, a=testonly https://hg.mozilla.org/integration/autoland/rev/3b095cbc8224 [wpt PR 36578] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
You need to log in before you can comment on or make changes to this bug.