Skip to content

Background color does not cover whole window on resize #9608

Closed

Description

@levrik
  • Electron version: (<=)? 1.6.6 - 1.7.2
  • Operating system: Windows 10 1703

Expected behavior

The red background color (set as option on the BrowserWindow) covers the whole window on resize.
I remember that behaviour from the last time I worked with Electron. Also noticed that issue in the current VS Code version (1.12.2).

Actual behavior

2017-05-27_19-06-11

How to reproduce

https://gist.github.com/levrik/e4a15c3a8e65ab484e9de00092fa4f43 or for example VS Code 1.12.2

Activity

  1. levrik commented on Aug 22, 2017

    @levrik
    ContributorAuthor

    Friendly ping.

  2. MarshallOfSound commented on Sep 24, 2018

    @MarshallOfSound
    Member

    We are no longer implementing bugfixes for versions of Electron <= 1.7.x, so I'm going to close this issue but if it is still persisting in more recent versions of Electron we can certainly reopen it!

  3. bpasero commented on Sep 24, 2018

    @bpasero
    Contributor

    @MarshallOfSound I see the same behaviour with Electron 3.0.x.

  4. bpasero commented on Sep 24, 2018

    @bpasero
    Contributor

    before

  5. codebytere commented on Sep 24, 2018

    @codebytere
    Member

    thanks @bpasero, i'll update labels!

  6. sofianguy commented on Aug 9, 2019

    @sofianguy
    Contributor

    Thank you for taking the time to report this issue and helping to make Electron better.

    The version of Electron you reported this on has been superseded by newer releases.

    If you're still experiencing this issue in Electron v4.2.x or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know.

    I'm setting the blocked/need-info label for the above reasons. This issue will be closed 7 days from now if there is no response.

    Thanks in advance! Your help is appreciated.

  7. 2 remaining items

  8. removed
    blocked/need-info ❌
    on Aug 12, 2019
  9. CraigMason commented on Sep 18, 2019

    @CraigMason

    image

    Some additional details. When resizing quickly, I see 3 different colours:

    1. The HTML body's background color
    2. The BrowserWindow.backgroundColor color
    3. Black
  10. AssetKid commented on Dec 25, 2019

    @AssetKid

    Still happening on 7.1.7

    2n4MZDV0HW

    backgroundColor is set to white

  11. MatteoGauthier commented on Jan 2, 2020

    @MatteoGauthier

    Up

  12. CrownFox commented on Sep 9, 2020

    @CrownFox

    Still happening on version 10.1.1

    This issue is more than 3 years old.

  13. lockieluke commented on Sep 10, 2020

    @lockieluke

    I think it is the problem of chromium, try to open your chrome and resize the window and you will see the same thing.

  14. miniak commented on Nov 6, 2021

    @miniak
    Contributor

    I don't think we can do much about this. Both Chrome and Edge have the same issue.

  15. billyang1222 commented on Sep 19, 2024

    @billyang1222

    Still happening on 20.0.0

  16. vladrasenko commented on Oct 17, 2025

    @vladrasenko

    the same on electron 36.9.5 macos 15.7.1
    as workaround

    const win = new BrowserWindow({
      // ...
      backgroundColor: nativeTheme.shouldUseDarkColors ? "#000" : "#fff",
      // ...
    });
    
    const handleThemeUpdated = () => {
      win.setBackgroundColor(nativeTheme.shouldUseDarkColors ? "#000" : "#fff");
    };
    
    nativeTheme.on("updated", handleThemeUpdated); // do not forget to unsubscribe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions