-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
White flash during page loading #414
Comments
This is the browser's behavior, so unlikely we'll change it. I'll create a feature request in our backlog to investigate though. Currently changing the browser's theme from "Light" to "Dark" uses a dark gray background while the page is loading. Would that work for your scenario if we exposed a way to change the theme? |
Thanks for the quick feedback - setting to Dark would be better than the white flash. I have two followups please:
As I mentioned, the hack I'm doing now hides the WebView2 HWND during ContentLoading and shows it "sometime after" NavigationCompleted (can't show it immediately because even then I get a white flash). So I'm wondering if there's a way for me to know when rendering has actually started? Because then I can hook that and SW_SHOW the HWND. I'm going to see if I can insert some javascript to detect when rendering starts, perhaps that's the only path right now.
In general I think it's non-productive to say "But ZZZ can do it", so I apologize in advance. My intent is positive. Since both solutions are using Chromium so this might be super useful for you : CefSettings::background_color is what we're using today in our app. Lastly, a plea: I believe this is more important than it might at first seem. Many apps are darker colors these days and those apps will suffer from this white-flash if they attempt to use WebView2. I get that there's lots of stuff you're working towards and this seems trivial, but the user experience could be so much better. Thanks for all the hard work you guys are doing. We are really happy to be moving towards WebView2. |
Thanks! |
Thanks for your responsiveness - good to see the API review, looks good to me. We especially appreciate the transparency mode, as we may end up using that instead. Thanks! |
Left and deleted a comment last night because I wasn't sure I'd made the announcement at the appropriate time. Turns out I was fine so I'm reposting, but thanks for taking a look! Hi all, I'm working on a background color API to address this. Would appreciate if any of you could take a look and give your feedback! |
@pdc-tstream The new DefaultBackgroundColor API is now available in 1.0.781-prerelease! It also supports setting a transparent color. Please give that a try and let us know if you find any issues. Thanks! |
Is there any way to show any color other than white while the page is loading?
Most of our embedded pages are dark.
Current hack is to hide the view during ContentLoading, and then reshow it with a timeout after NavigationCompleted.
This works but as you can imagine introduces latency and is prone to error.
AB#28898913
The text was updated successfully, but these errors were encountered: