-
Notifications
You must be signed in to change notification settings - Fork 63
Flash when using Multiple WebViews in Tab Controls #1412
Description
I'm running into major flashing issues with the control when using WebView2 in a tab control where there are multiple tab controls activated for each tab.
Here's a screen capture that demonstrates:
(the screen capture enhances this behavior, it's not quite as noticeable as this capture shows it but definitely noticeable)
Notice the flicker on every tab switch. In this case, the WebView2 here holds a rendered HTML document that's already loaded and rendered and is not reloaded when a new tab is activated and the page is not being reloaded when the tab changes in this case - it's merely being displayed again.
In this case the WV is already rendered so there no other content loading that is empty first.
A few additional points:
- If I hide the tabs the flicker disappears on tab switches (ie. it's not in the tabs themselves)
- I've set the background color for the WV, the content area below etc. which works for activation but not deactivation apparently
I'm guessing what's happening is that when the tab is deactivated the WV gets removed from the container and that's when the unformatted white 'hole' appears briefly before the new page gets activated and overlaid. If I had to guess this is the same issue we were dealing with the start up flash a while back except now when the control is being moved out of the container.
FWIW I also had this to a much less noticeable extent with the WebBrowser control and likely due to the same semantics of removing the windowed control and reinserting a different one.
I haven't figure out a way around this. During startup I can hide the control and make it visible only after content has loaded, which I have working - albeit with a noticeable and annoying startup delay. However, I can't do the same for the tab deactivation re-activation as there is no clean hook I can find to make the control invisible before the tab switch occurs.
Original Bug: AB#33815184
DOMContentLoaded Bug: AB#34093671
Visibility Bug: AB#34093759
