Skip to content

[Bug]: setWindowOpenHandler changes default stylesheet for plain text files in dark theme #37737

@ajafff

Description

@ajafff

Preflight Checklist

Electron Version

>=22.0.0

What operating system are you using?

Windows

Operating System Version

Windows 10 Enterprise 22H2

What arch are you using?

x64

Last Known Working Electron version

21

Expected Behavior

Click on the link to open the plain text file in a new window.
Text should be readable, e.g. white text on dark background.

Actual Behavior

Text is not readable. It's white text on white background.
This seems to only happen if there is a setWindowOpenHandler. If you comment out that line, a dark background is applied.

Testcase Gist URL

https://gist.github.com/ajafff/8d9e8eb8cc0a7ec2297f2445c54f5526

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions