mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-08-03 19:38:36 -04:00
Fix blocked access to external window in UWP
This commit is contained in:
parent
0a98667832
commit
424d445860
@ -5285,8 +5285,9 @@ function filterClickEvent (event) {
|
|||||||
if (!/^(?:#|javascript)/i.test(decHref)) {
|
if (!/^(?:#|javascript)/i.test(decHref)) {
|
||||||
uiUtil.pollSpinner('Loading ' + decHref.replace(/([^/]+)$/, '$1').substring(0, 18) + '...');
|
uiUtil.pollSpinner('Loading ' + decHref.replace(/([^/]+)$/, '$1').substring(0, 18) + '...');
|
||||||
// Tear down contents of previous document -- this is needed when a link in a ZIM link in an external window hasn't had
|
// Tear down contents of previous document -- this is needed when a link in a ZIM link in an external window hasn't had
|
||||||
// an event listener attached. For example, licks in popovers in external windows.
|
// an event listener attached. For example, licks in popovers in external windows. UWP doesn't allow access to the contents
|
||||||
if (articleWindow && articleWindow.document && articleWindow.document.body) {
|
// of the external window, so we can't clear it.
|
||||||
|
if (!/UWP/.test(params.appType) && articleWindow && articleWindow.document && articleWindow.document.body) {
|
||||||
articleWindow.document.body.innerHTML = '';
|
articleWindow.document.body.innerHTML = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user