mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-08 11:48:26 -04:00
Prevent ugly jumping of toolbar on new article load
Former-commit-id: 5f89e846cd793eecaafa7cbe161ffbc3f6c6c563 [formerly 08f853a0c199427dc235cc2f3d4bac4966657ceb] Former-commit-id: 594fe2461df44d41f3b79edcb5d20117ae8ee02a
This commit is contained in:
parent
23a5b43ebd
commit
5e7da5aecc
@ -910,6 +910,7 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'utf8', 'images', 'cooki
|
||||
var iframe = document.getElementById('articleContent');
|
||||
var prefix = document.getElementById('prefix');
|
||||
var findInArticle = document.getElementById('findInArticle');
|
||||
article.style.transition = "top 300ms";
|
||||
|
||||
// This is the scrollFunction to be attached in checkToolbar()
|
||||
var scrollFunction = function () {
|
||||
@ -933,9 +934,9 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'utf8', 'images', 'cooki
|
||||
scrollFunction();
|
||||
} else {
|
||||
// Ensure toolbar is restored
|
||||
article.style.top = '-' + navbarHeight;
|
||||
header.style.zIndex = 0;
|
||||
iframe.style.zIndex = -1;
|
||||
//article.style.top = '-' + navbarHeight;
|
||||
//header.style.zIndex = 0;
|
||||
//iframe.style.zIndex = -1;
|
||||
setTimeout(function () {
|
||||
iframe.style.zIndex = 0;
|
||||
article.style.top = '0';
|
||||
|
Loading…
x
Reference in New Issue
Block a user