Closed Bug 1744792 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 31933 - [selectmenu] Don't run controller code if event was preventDefaulted

Categories

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

task

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox97 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Dan Clark <daniec@microsoft.com> wrote:

[selectmenu] Don't run controller code if event was preventDefaulted

If an author does preventDefault on a click or keyboard event, then
that event shouldn't trigger \<selectmenu> controller code behavior.

This can be useful for cases where authors want to nest interactive
content (buttons, etc) inside \<selectmenu> parts. They may want to
preventDefault events handled by the nested content so that the event
doesn't bubble up to the outer part and trigger \<selectmenu> behavior.

Bug: 1121840
Change-Id: Ia2b20b73cc4f9137e2501016c372a4a064aefe6b
Reviewed-on: https://chromium-review.googlesource.com/3319507
WPT-Export-Revision: 901ac432ffc885e4ceeedf4507e40b7af68bffd1

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

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

Total 1 tests and 2 subtests

Status Summary

Firefox

OK : 1
FAIL : 2

Chrome

TIMEOUT: 1
ERROR : 1
NOTRUN : 1

Safari

ERROR : 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/html/semantics/forms/the-selectmenu-element/selectmenu-events.tentative.html
Button controller code should not run if the click event is preventDefaulted.: FAIL (Chrome: TIMEOUT)
Listbox controller code should not run if the click event is preventDefaulted.: FAIL (Chrome: NOTRUN)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/46327b1af901
[wpt PR 31933] - [selectmenu] Don't run controller code if event was preventDefaulted, a=testonly
https://hg.mozilla.org/integration/autoland/rev/eb29b470150f
[wpt PR 31933] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
You need to log in before you can comment on or make changes to this bug.