1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Windows: WebBrowserComponent: Fix state handling when the component is invisible

The handling of two state variables had to be adjusted. One is
responsible for signalling that we navigated to a blank page due to the
WebBrowserComponent becoming invisible. The other variable in the
WebView2 implementation stores the URL that we should be navigating to
once the WebView2 instance has been created.

Prior to this commit navigating to the URL requested by goToURL could
fail for two reasons: either because it was called before the underlying
WebView2 instance was created, or because the WebBrowserComponent was
not yet visible.
This commit is contained in:
attila 2024-08-15 18:39:58 +02:00
parent c1ae3ab7ae
commit a34bd74133
2 changed files with 3 additions and 3 deletions

View file

@ -474,7 +474,7 @@ public:
}
else
{
if (owner.unloadPageWhenHidden && ! owner.blankPageShown)
if (webView != nullptr && owner.unloadPageWhenHidden && ! owner.blankPageShown)
{
// when the component becomes invisible, some stuff like flash
// carries on playing audio, so we need to force it onto a blank