* [misc] fix open app with old page first time not load in firefox.

This commit is contained in:
sunhao
2025-11-07 15:16:31 +08:00
parent 05277d44b7
commit d5729f9a29
+13 -2
View File
@@ -1008,8 +1008,19 @@
clearTimer();
if($page.hasClass('hidden')) $page.addClass('loading').removeClass('hidden');
const $iframe = $page.find('iframe').removeClass('in').addClass('invisible');
if($iframe.attr('src') === url && $iframe[0].contentWindow.location.href === url) $iframe[0].contentWindow.location.reload();
else $iframe.attr('src', url);
if($iframe.attr('src') === url && $iframe[0].contentWindow.location.href === url)
{
$iframe[0].contentWindow.location.reload();
}
else
{
$iframe.attr('src', url);
setTimeout(() =>
{
// Fix firefox not load page when iframe is not ready.
if($iframe[0].contentWindow.location.href === 'about:blank') $iframe[0].contentWindow.location.href = url;
}, 500);
}
currentAppUrl = url;
openedOldPage = url;
triggerEvent('openOldPage');