`nativeTheme.shouldUseDarkColorsForSystemIntegratedUI` has an incorrect (inverted) value after the 'updated' event
Author: panther7Created Jul 12, 2026Updated Sep 17, 2026
Labelsplatform/windowsbug :beetle:component/native-themehas-repro-gist41-x-y42-x-y43-x-y
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
41.10.1, 42.6.1, 43.1.0
What operating system(s) are you using?
Windows
Operating System Version
Windows 11 25H2
What arch are you using?
x64
Last Known Working Electron version
39.0.0-beta.3
Does the issue also appear in Chromium / Google Chrome?
I don't know how to test
Expected Behavior
The first call to nativeTheme.shouldUseDarkColorsForSystemIntegratedUI returns the correct value, as described in the docs.
The value read inside the nativeTheme 'updated' event listener is inverted.
function isDark() {
console.log('isDark', nativeTheme.shouldUseDarkColorsForSystemIntegratedUI)
}
nativeTheme.on('updated', () => isDark()) // inverted value...
isDark() // ok
Actual Behavior
https://github.com/user-attachments/assets/9cd24aca-3f89-4e8d-822f-0534e83ecf78
Testcase Gist URL
https://gist.github.com/c75f4f0c02dfdbad8e410cf650b5d6b5
Additional Information
No response
Source: electron/electron