mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-08-04 03:48:41 -04:00
This commit is contained in:
parent
19ad658de8
commit
021b64d13e
@ -4953,7 +4953,8 @@ function readArticle (dirEntry) {
|
|||||||
appstate.expectedArticleURLToBeDisplayed = dirEntry.namespace + '/' + dirEntry.url;
|
appstate.expectedArticleURLToBeDisplayed = dirEntry.namespace + '/' + dirEntry.url;
|
||||||
params.pagesLoaded++;
|
params.pagesLoaded++;
|
||||||
// We must remove focus from UI elements in order to deselect whichever one was clicked (in both Restricted and SW modes),
|
// We must remove focus from UI elements in order to deselect whichever one was clicked (in both Restricted and SW modes),
|
||||||
articleContainer = articleContainer || articleWindow;
|
// articleContainer = articleContainer || articleWindow;
|
||||||
|
articleContainer = (articleWindow.self !== articleWindow.top) ? iframe : articleWindow;
|
||||||
if (!params.isLandingPage && articleContainer.contentWindow) articleContainer.contentWindow.focus();
|
if (!params.isLandingPage && articleContainer.contentWindow) articleContainer.contentWindow.focus();
|
||||||
uiUtil.pollSpinner()
|
uiUtil.pollSpinner()
|
||||||
// Show the spinner with a loading message
|
// Show the spinner with a loading message
|
||||||
@ -5248,7 +5249,7 @@ function filterClickEvent (event) {
|
|||||||
// Get the window of the clicked anchor
|
// Get the window of the clicked anchor
|
||||||
articleWindow = clickedAnchor.ownerDocument.defaultView;
|
articleWindow = clickedAnchor.ownerDocument.defaultView;
|
||||||
// Determine if the window is in an iframe
|
// Determine if the window is in an iframe
|
||||||
articleContainer = (articleWindow.self !== articleWindow.top) ? window.frames[0] : articleWindow;
|
articleContainer = (articleWindow.self !== articleWindow.top) ? iframe : articleWindow;
|
||||||
// This prevents any popover from being displayed when the user clicks on a link
|
// This prevents any popover from being displayed when the user clicks on a link
|
||||||
clickedAnchor.articleisloading = true;
|
clickedAnchor.articleisloading = true;
|
||||||
// Check for Zimit links that would normally be handled by the Replay Worker
|
// Check for Zimit links that would normally be handled by the Replay Worker
|
||||||
|
Loading…
x
Reference in New Issue
Block a user