element-hq / element-hq/element-web
Window Briefly Flashes White While Launching
- Dominant language
- TypeScript
- Stars
- 13.5k
- Forks
- 2.8k
- PR merge metrics
- PR metrics pending
Description
## Expected Behavior
When Element Desktop is launching and the window first appears, the window should show the user interface (e.g. a loading screen or similar).
## Actual Behavior
When Element Desktop is launching and the window first appears, the window briefly flashes white before the loading animation is shown.
[I have uploaded a short screen recording of the issue to YouTube.](https://youtu.be/tGlEVuesQjk)
## Steps to reproduce
Launch Element Desktop when it is not already running.
(The white flash may present itself in other situations, as well.)
## Version Information
* Operating system: macOS 11.5.2
* Element version: 1.8.5
* Installed from https://element.io/get-started
* Homeserver: matrix.org
* rageshake not submitted
## Commentary
The white flash when launching an Electron application is a known issue that should be easy to fix. The white flash occurs because the `BrowserWindow` instance is shown before the CSS is done loading, and one way of fixing the issue is using a `ready-to-show` event and waiting to show the `BrowserWindow` until after the CSS is done loading.
[More detailed instructions can be found here.](https://www.christianengvall.se/electron-white-screen-app-startup/)
## Related Issues
I filed a fresh bug report because no one has previously created a bug report about the white flash at startup. However, people have mentioned similar behavior ambiguously or in slightly different contexts, which I will link below:
* [Light theme is used before setting the dark theme](https://github.com/vector-im/element-web/issues/4895) (not quite the same issue because it involves the loading screen using the wrong theme)
* [White screen of welcome when upgrading Riot can be confusing](https://github.com/vector-im/element-web/issues/9243) (extremely vague bug report that may or may not be the same thing)
* [Element starts with white screen](https://github.com/vector-im/element-web/issues/14916) (exactly the same issue I'm seeing, but closed because it was blamed on Snap)
* [Loader looks bad in dark mode](https://github.com/vector-im/element-web/issues/16498) (also about the loading screen theme, not the blank screen before the loading screen)
* [Use system theme by default](https://github.com/vector-im/element-web/issues/18203#issuecomment-885629738) (white flash mentioned in comment thread)
Contributor guide
Assessment
This issue has not been assessed yet.