mirror of
https://github.com/kiwix/kiwix-js.git
synced 2025-09-23 04:28:30 -04:00
Closes #520.
This commit is contained in:
parent
c6b809585d
commit
0f4b102703
@ -906,14 +906,14 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies','abstractFiles
|
||||
// The content is fully loaded by the browser : we can hide the spinner
|
||||
$("#searchingArticles").hide();
|
||||
// Deflect drag-and-drop of ZIM file on the iframe to Config
|
||||
var doc = iframeArticleContent.contentDocument.documentElement;
|
||||
var doc = iframeArticleContent.contentDocument ? iframeArticleContent.contentDocument.documentElement : null;
|
||||
var docBody = doc ? doc.getElementsByTagName('body') : null;
|
||||
docBody = docBody ? docBody[0] : null;
|
||||
if (docBody) {
|
||||
docBody.addEventListener('dragover', handleIframeDragover);
|
||||
docBody.addEventListener('drop', handleIframeDrop);
|
||||
}
|
||||
iframeArticleContent.contentWindow.onunload = function() {
|
||||
if (iframeArticleContent.contentWindow) iframeArticleContent.contentWindow.onunload = function() {
|
||||
$("#searchingArticles").show();
|
||||
};
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user