Skip to content

[Problem/Bug]: WebView2 content is unexpectedly rendered in dark mode when Windows is set in dark mode #5392

@fvanheeswijk

Description

@fvanheeswijk

What happened?

Since the 142.0.3595.11 beta version of the runtime content inside the WebView2 browser is suddenly rendered in dark mode when Windows is set to dark mode whereas this was not the case in earlier (beta) versions of the runtime.

Please revert this change as it is unexpected, we should be in control of whether we support dark mode as application developers.
Furthermore, I tested setting the CoreWebView2Profile.PreferredColorScheme Property to Light and it still did not change this behavior.

Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Prerelease (Edge Canary/Dev/Beta)

Runtime Version

142.0.3595.11 beta

SDK Version

1.0.3405.78

Framework

Winforms

Operating System

Windows 11

OS Version

10.0.26100

Repro steps

Run a Windows Forms application with a WebView2 control in it with web content inside. The behavior we are seeing that the content is dark (usually), but even when that it is not the case then there is always a disruptive black flash.

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Regression in newer Runtime

Last working version (if regression)

141.0.3537.57 beta (most likely)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingregressionSomething used to work but doesn't anymoretrackedWe are tracking this work internally.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions