[Bug]: BrowserViews not painting their WebContents when minimize
TianbinTobin opened this issue · comments
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
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
- run the Electron Fiddle Gist
- after the first WebContents painting
- minimize the program
- run
electronAPI.openTab()
in Developer Tools - 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.