Improve composition for non-MS browsers

Former-commit-id: a8637b15af7ae2132c7712b4b20e70815d91e559 [formerly a1271a15007ff9482e5ddaacfe9d0d79ae6de0e7 [formerly fe38645eaccfe182c8796d8e50ed2c370ef1c0fd]]
Former-commit-id: ffb204447e52cde9485deb2ca98c527405b050a2
Former-commit-id: 59ed13ac7dc0a3e40b8a20368ce0480457bfb481
This commit is contained in:
Jaifroid 2021-06-14 15:38:21 +01:00
parent e61df79c87
commit b6bd196bc2
2 changed files with 10 additions and 6 deletions

View File

@ -88,6 +88,4 @@
"dependencies": {
"@types/fs-extra": "^9.0.11"
}
}
}

View File

@ -3826,12 +3826,18 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'cache', 'images', 'sett
// Make sure the article area is displayed
setTab();
checkToolbar();
// setTimeout(function() {
var showArticle = function () {
articleDocument.bgcolor = "";
articleDocument.hidden = false;
articleWindow.document.body.hidden = false;
// }, 0);
};
if ('MSBlobBuilder' in window) {
// For legacy MS browsers, including UWP, delay causes blank screen on slow systems
showArticle();
} else {
// For Chromium browsers a small delay greatly improves composition
setTimeout(showArticle, 80);
}
};
// For articles loaded in the iframe, we need to set the articleWindow (but if the user is opening a new tab/window,