Skip to content

macOS 26 light mode while Electron on dark theme causes a white line at the top of Electron apps #51015

Closed

Description

@AlwaysExtraordinary

Preflight Checklist

Electron Version

41.2.0, 39.6.0

What operating system(s) are you using?

macOS

Operating System Version

macOS 26.4.1

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Electron version

No response

Does the issue also appear in Chromium / Google Chrome?

I don't know how to test

Expected Behavior

no white line on the top while on dark theme

Actual Behavior

Image

Testcase Gist URL

https://gist.github.com/AlwaysExtraordinary/0eda27d8d2d36042eb9a6aa4236ad436

Additional Information

VSCode is an example. Setting the title bar style to custom and the theme to dark while macOS system is on light mode will cause this problem. Changing wallpaper into black will make it more apparent. I found that many electron apps have this kind of problem.

Activity

  1. nikwen commented on Apr 13, 2026

    @nikwen
    Member

    Thanks for reporting!

    Would you be able to download Electron Fiddle, use it to create a small sample app that allows maintainers to reproduce this issue, and upload it as a GitHub gist from Fiddle?

  2. added
    blocked/need-repro
    on Apr 13, 2026
  3. electron-issue-triage commented on Apr 13, 2026

    @electron-issue-triage

    Hello @AlwaysExtraordinary. Thanks for reporting this and helping to make Electron better!

    Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use.

    Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.

    Now adding the blocked/need-repro Needs a test case to reproduce the bug label for this reason. After you make a test case, please link to it in a followup comment. This issue will be closed in 10 days if the above is not addressed.

  4. AlwaysExtraordinary commented on Apr 14, 2026

    @AlwaysExtraordinary
    Author

    Thanks for reporting!

    Would you be able to download Electron Fiddle, use it to create a small sample app that allows maintainers to reproduce this issue, and upload it as a GitHub gist from Fiddle?

    Here is my gist example:
    https://gist.github.com/AlwaysExtraordinary/0eda27d8d2d36042eb9a6aa4236ad436

    Steps to reproduce:

    1. Run the Electron Fiddle
    2. Place the window on a black background
      you'll see the distracting white line on the top of the window
    Image
  5. removed
    blocked/need-repro
    on Apr 14, 2026
  6. nikwen commented on Apr 14, 2026

    @nikwen
    Member

    Thank you! Does it still happen on Electron v41/v42?

    EDIT: Just saw that your gist is on v41. Will update the issue.

  7. added
    has-repro-gist
    on Apr 14, 2026
  8. moved this to 👀 Unsorted Items in 41-x-yon Apr 14, 2026
  9. moved this from 👀 Unsorted Items to 👍 Does Not Block Stable in 41-x-yon Apr 15, 2026
  10. AlwaysExtraordinary commented on Apr 20, 2026

    @AlwaysExtraordinary
    Author

    I find that the newest VS Code on Electron 39.8 also has this problem. This seems to be a long-standing issue across many versions.
    Here is a related issue in VS Code repository: microsoft/vscode#144389

  11. A-Star100 commented on Apr 21, 2026

    @A-Star100
    Contributor
    Image Tested on Electron v42 (latest alpha) and it happens here too.
  12. AlwaysExtraordinary commented on Jul 14, 2026

    @AlwaysExtraordinary
    Author

    It looks like macOS 27 beta 3 has removed all the extra white lines on windows. Finally they fixed it—hope they won't reverse it.

    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    39-x-y41-x-ybug 🪲component/BrowserWindowhas-repro-gistplatform/macOS

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions