electron / electron

:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS

Home Page:https://electronjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: BrowserViews not painting their WebContents when minimize

TianbinTobin opened this issue · comments

Preflight Checklist

Electron Version

19.0.6

What operating system are you using?

Windows

Operating System Version

Windows 10 version 21H2

What arch are you using?

x64

Last Known Working Electron version

19.0.6

Expected Behavior

  1. run the Electron Fiddle Gist
  2. after the first WebContents painting
  3. minimize the program
  4. run electronAPI.openTab() in Developer Tools
  5. Expected painting the new WebContents

Actual Behavior

BrowserViews not painting their WebContents when minimize, the program is white screen until you change his size

Testcase Gist URL

https://gist.github.com/1928de14317d540d1e7028451374ab15

Additional Information

run electronAPI.openTab() in Developer Tools

Has anyone found any other workarounds than resizing the window?

Has anyone found any other workarounds than resizing the window?

no found

I've found a workaround:

BrowserWindow.on('restore', () => BrowserWindow.show())

But the size of the window is still lost.

I've found a workaround:

BrowserWindow.on('restore', () => BrowserWindow.show())

But the size of the window is still lost.

I tried but it didn't work.

only BrowserWindow.on('restore', () => BrowserView.setBounds()) working well.

I am not using BrowserViews explicitly only the BrowserWindow, maybe that's why the different workarounds.

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.