Bug 265071 - Don't fire dblclick on disabled form control elements
Summary: Don't fire dblclick on disabled form control elements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ahmad Saleem
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-17 16:16 PST by Tim Nguyen (:ntim)
Modified: 2023-11-19 09:12 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Radar WebKit Bug Importer 2023-11-17 16:17:18 PST
<rdar://problem/118584431>
Comment 2 Ahmad Saleem 2023-11-17 16:31:24 PST
Something to do here?

https://searchfox.org/wubkat/rev/114aa2c8594807cbc34dd5dff48a9e2addfd1e00/Source/WebCore/dom/EventDispatcher.cpp#160

if (node.document().settings().sendMouseEventsToDisabledFormControlsEnabled() && event.isTrusted() && event.isMouseEvent()
        && (event.type() == eventNames().mousedownEvent || event.type() == eventNames().mouseupEvent || event.type() == eventNames().clickEvent)) {
        eventPath.adjustForDisabledFormControl();
    }
Comment 3 Ahmad Saleem 2023-11-17 16:33:14 PST
Adding:

|| event.type() == eventNames().dblclickEvent
Comment 4 Ahmad Saleem 2023-11-17 17:25:31 PST
NOTE - this compiles and after importing new tests and running on patch build, we pass all tests.

@Tim - do you want me to do PR? I might do separate bug first to update all tests.
Comment 5 Ahmad Saleem 2023-11-17 17:26:35 PST
PASS Testing dblclick events when clicking child of disabled button.
PASS Testing dblclick events when clicking child of disabled my-control.
PASS Testing dblclick events when clicking disabled button.
PASS Testing dblclick events when clicking disabled my-control.

^ All passes.
Comment 6 Abrar Rahman Protyasha 2023-11-17 17:44:24 PST
@ahmad.saleem792@gmail.com go for it. Let's start with a PR syncing `wpt:html/semantics/` and then a PR for the fix you're proposing.
Comment 7 Abrar Rahman Protyasha 2023-11-17 17:44:45 PST
Ah, spoke a minute too late, I see the WPT sync PR is up.
Comment 8 EWS 2023-11-19 09:12:06 PST
Committed 270951@main (74ae3ea8d68e): <https://commits.webkit.org/270951@main>

Reviewed commits have been landed. Closing PR #20723 and removing active labels.