diff --git a/www/js/app.js b/www/js/app.js index 7a83d7ef..fe194e5b 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -756,8 +756,10 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'cache', 'images', 'sett document.getElementById('scrollbox').style.height = 0; document.getElementById('search-article').style.overflowY = 'hidden'; setTimeout(function() { - document.getElementById('articleContent').style.display = 'block'; - document.getElementById('articleContent').focus(); + if (appstate.target === 'iframe') { + if (articleContainer) articleContainer.style.display = 'block'; + if (articleWindow) articleWindow.focus(); + } }, 50); } $("#articleList").empty();