From 5e7da5aecca67c9593ea08de7d8290b6e0ee0346 Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Tue, 31 Dec 2019 11:49:14 +0000 Subject: [PATCH] Prevent ugly jumping of toolbar on new article load Former-commit-id: 5f89e846cd793eecaafa7cbe161ffbc3f6c6c563 [formerly 08f853a0c199427dc235cc2f3d4bac4966657ceb] Former-commit-id: 594fe2461df44d41f3b79edcb5d20117ae8ee02a --- www/js/app.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/www/js/app.js b/www/js/app.js index 8b696a2d..c0e54c38 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -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';