Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5a76e09fdaa304e0d733d9836b355c725e3d551d
https://github.com/WebKit/WebKit/commit/5a76e09fdaa304e0d733d9836b355c725e3d551d
Author: Jessica Cheung <[email protected]>
Date: 2026-05-08 (Fri, 08 May 2026)
Changed paths:
M Source/WebKit/UIProcess/mac/WebDataListSuggestionsDropdownMac.mm
Log Message:
-----------
REGRESSION (macOS Tahoe): <datalist> completion list background turns white
on white text after typing a character when in dark mode
https://bugs.webkit.org/show_bug.cgi?id=314241
rdar://168676757
Reviewed by Tim Horton, Aditya Keerthi, and Abrar Rahman Protyasha.
If a user is in dark mode but the datalist is on a document that has a light
background, the datalist background color initially starts out as dark but turns
to light after the user types a character. When a character is typed,
updateWithInformation is called and refreshes the datalist suggestions.
This function also moves the window and thus, causes it to re-sample the
background.
In this case, what is right underneath the datalist is a light color,
regardless of
dark or light mode. This was verified by changing the background color of the
<body>.
A light gray color on <body> caused the datalist background color to be light,
and a
dark gray caused it to be dark.
To prevent this dynamic adjustment for datalists, if liquid glass is used, set
NSGlassEffectView
to _NSGlassEffectViewAdaptiveAppearanceOff. After this change, the datalist
remains the same color as the original appearance mode (dark or light). Note
that AppKit menus
also use _NSGlassEffectViewAdaptiveAppearanceOff for glass views.
* Source/WebKit/UIProcess/mac/WebDataListSuggestionsDropdownMac.mm:
(-[WKDataListSuggestionWindow initWithContentRect:styleMask:backing:defer:]):
Canonical link: https://commits.webkit.org/312889@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications