Try waiting for iframe document.onload instead of looping and waiting for document.body to exist.
This commit is contained in:
@@ -471,13 +471,9 @@
|
|||||||
// CryptPad
|
// CryptPad
|
||||||
var _iframe = window._iframe = iframe.$;
|
var _iframe = window._iframe = iframe.$;
|
||||||
var fw = this;
|
var fw = this;
|
||||||
var intr = setInterval(function () {
|
_iframe.contentWindow.onload = function () {
|
||||||
//console.log(_iframe.contentWindow.document.body);
|
|
||||||
if (_iframe.contentWindow && _iframe.contentWindow.document && _iframe.contentWindow.document.body) {
|
|
||||||
clearInterval(intr);
|
|
||||||
CKEDITOR.tools.callFunction(fw._.frameLoadedHandler, _iframe.contentWindow);
|
CKEDITOR.tools.callFunction(fw._.frameLoadedHandler, _iframe.contentWindow);
|
||||||
}
|
};
|
||||||
}, 10);
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Work around Firefox bug - error prune when called from XUL (http://dev.ckeditor.com/ticket/320),
|
// Work around Firefox bug - error prune when called from XUL (http://dev.ckeditor.com/ticket/320),
|
||||||
|
|||||||
Reference in New Issue
Block a user