Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4509531a0302a134f49aae23194372ed4ba9d0d8
https://github.com/WebKit/WebKit/commit/4509531a0302a134f49aae23194372ed4ba9d0d8
Author: Sean Patterson <[email protected]>
Date: 2026-04-23 (Thu, 23 Apr 2026)
Changed paths:
A LayoutTests/fast/events/anchor-mouse-focusable-quirk-expected.txt
A LayoutTests/fast/events/anchor-mouse-focusable-quirk.html
M LayoutTests/platform/glib/TestExpectations
M LayoutTests/platform/ios/TestExpectations
M LayoutTests/platform/win/TestExpectations
M Source/WebCore/html/HTMLAnchorElement.cpp
M Source/WebCore/page/Quirks.cpp
M Source/WebCore/page/Quirks.h
M Source/WebCore/page/QuirksData.h
Log Message:
-----------
Add site-specific quirk to make anchor elements mouse-focusable on
thesaurus.com and dictionary.com
https://bugs.webkit.org/show_bug.cgi?id=312692
rdar://174959285
Reviewed by Abrar Protyasha.
Clicking links on thesaurus.com and dictionary.com causes blur events with a
null relatedTarget, breaking dropdown menus that rely on relatedTarget to stay
open.
Rather than changing the default behavior for all sites, add a site-specific
quirk following the existing needsFormControlToBeMouseFocusable pattern. The
broader behavior discussion is tracked in bug 22261.
Widen platform guards from PLATFORM(MAC) to PLATFORM(COCOA) so the quirk is
also effective on iPad desktop-class browsing and visionOS.
* LayoutTests/fast/events/anchor-mouse-focusable-quirk-expected.txt: Added.
* LayoutTests/fast/events/anchor-mouse-focusable-quirk.html: Added.
* Source/WebCore/html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::isMouseFocusable):
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::needsAnchorToBeMouseFocusable):
(WebCore::handleThesaurusQuirks):
(WebCore::handleDictionaryQuirks):
(WebCore::Quirks::determineRelevantQuirks):
* Source/WebCore/page/Quirks.h:
* Source/WebCore/page/QuirksData.h:
Canonical link: https://commits.webkit.org/311907@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications