[Bug]: setWindowOpenHandler results in incorrect dark mode background color for text/plain content #36538
Closed
3 tasks done
Labels
19-x-y
20-x-y
21-x-y
22-x-y
23-x-y
bug 🪲
component/BrowserWindow
has-repro-gist
Issue can be reproduced with code at https://gist.github.com/
status/confirmed
A maintainer reproduced the bug or agreed with the feature
Preflight Checklist
Electron Version
Electron 21.3.1, 22.0.0, and the latest 24.0.0-nightly.20221201
What operating system are you using?
macOS 13 and Windows 11
What arch are you using?
arm64 (including Apple Silicon)
Last Known Working Electron version
n/a
Expected Behavior
When the system is in dark mode, and a popup is opened via
window.open
to a URL returning content of typetext/plain
, the resulting popup window should have a black background with white text. This happens correctly unlessmainWindow.webContents.setWindowOpenHandler
is called.See https://www.loom.com/share/4af414156762410e994b5e2a56d997c7 for the correct behavior when
mainWindow.webContents.setWindowOpenHandler
is commented out.Actual Behavior
With the call to
mainWindow.webContents.setWindowOpenHandler
uncommented, the popup window incorrectly has white text with a white background. See https://www.loom.com/share/15aadf785f3740c5b8f07239ea1e46ed for the actual behavior.Testcase Gist URL
https://gist.github.com/36925a2377d0b8c7c67abd9816c2f411
The text was updated successfully, but these errors were encountered: