From 60dd083af02c6342b8dd0f3dcf627c1fd1ea7022 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Thu, 30 Nov 2023 15:49:59 +0000 Subject: [PATCH] Bug 1863364 [wpt PR 42976] - Don't fire dblclick on disabled form control elements, a=testonly Automatic update from web-platform-tests Don't fire dblclick on disabled form control elements As discussed here, we should apply the event blocking behavior for disabled form controls to dblclick in addition to click, mouseup, and mousedown: https://github.com/whatwg/html/issues/2368#issuecomment-1791704780 Change-Id: Ibc52585ce0704d8ba8467efc3462bd378d23fbae Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5007308 Commit-Queue: Joey Arhar Reviewed-by: Mason Freed Cr-Commit-Position: refs/heads/main{#1225838} -- wpt-commits: dd5d55c3debd577a09921b32f3816797664c5e86 wpt-pr: 42976 UltraBlame original commit: 3bf4c6228d9c37fc63955610b37cb0bf6d5dff3d --- .../disabled-event-dispatch.tentative.html | 74 +++++++++++++++++-- 1 file changed, 69 insertions(+), 5 deletions(-) diff --git a/testing/web-platform/tests/html/semantics/disabled-elements/disabled-event-dispatch.tentative.html b/testing/web-platform/tests/html/semantics/disabled-elements/disabled-event-dispatch.tentative.html index 1ba8387e27133..4326d7d2e0221 100644 --- a/testing/web-platform/tests/html/semantics/disabled-elements/disabled-event-dispatch.tentative.html +++ b/testing/web-platform/tests/html/semantics/disabled-elements/disabled-event-dispatch.tentative.html @@ -284,6 +284,9 @@ ' click ' +' +dblclick +' ] . forEach @@ -385,18 +388,79 @@ true ) ; -await -test_driver -. -click -( +const +elementToClick += clickChildElement ? targetchild : target +; +if +( +eventName += += += +' +dblclick +' +) +{ +await +( +new +test_driver +. +Actions +( +) +. +pointerMove +( +1 +1 +{ +origin +: +elementToClick +} +) +. +pointerDown +( +) +. +pointerUp +( +) +. +pointerDown +( +) +. +pointerUp +( +) +) +. +send +( +) +; +} +else +{ +await +test_driver +. +click +( +elementToClick ) ; +} const parentShouldReceiveEvents =