From 7fc1d9a1aec58acfc4359ffa45c8b1ce342fb2d8 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Thu, 9 Apr 2026 00:08:07 +0300 Subject: #5607 workaround fix for the web content being black after resizing --- indra/llplugin/llpluginclassmedia.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/llplugin/llpluginclassmedia.cpp') diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 77a4b08af5..a1e1f75367 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -1641,3 +1641,15 @@ void LLPluginClassMedia::initializeUrlHistory(const LLSD& url_history) LL_DEBUGS("Plugin") << "Sending history" << LL_ENDL; } + +void LLPluginClassMedia::forceRenderRefresh() +{ + // Force layout recalculation by briefly hiding/showing the web content + // Used to clear black screen issues after resize, see #5607 + const std::string refresh_script = + "document.documentElement.style.visibility='hidden';" + "document.documentElement.offsetHeight;" + "document.documentElement.style.visibility='';"; + + executeJavaScript(refresh_script); +} -- cgit v1.3