Fix race condition preventing slide to work on Edge
This commit is contained in:
parent
f2aaaa9751
commit
290d668ceb
@ -105,6 +105,21 @@ define([
|
|||||||
insideHandlers.push(content);
|
insideHandlers.push(content);
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
|
// Make sure both iframes are ready
|
||||||
|
var readyHandlers = [];
|
||||||
|
chan.onReady = function (h) {
|
||||||
|
if (typeof(h) !== "function") { return; }
|
||||||
|
readyHandlers.push(h);
|
||||||
|
};
|
||||||
|
chan.ready = function () {
|
||||||
|
chan.whenReg('EV_RPC_READY', function () {
|
||||||
|
chan.event('EV_RPC_READY');
|
||||||
|
});
|
||||||
|
chan.on('EV_RPC_READY', function () {
|
||||||
|
readyHandlers.forEach(function (h) { h(); });
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
var txid;
|
var txid;
|
||||||
window.addEventListener('message', function (msg) {
|
window.addEventListener('message', function (msg) {
|
||||||
var data = JSON.parse(msg.data);
|
var data = JSON.parse(msg.data);
|
||||||
|
|||||||
@ -313,6 +313,8 @@ define([
|
|||||||
Cryptpad.useTemplate(href, Cryptget, cb);
|
Cryptpad.useTemplate(href, Cryptget, cb);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
sframeChan.ready();
|
||||||
CpNfOuter.start({
|
CpNfOuter.start({
|
||||||
sframeChan: sframeChan,
|
sframeChan: sframeChan,
|
||||||
channel: secret.channel,
|
channel: secret.channel,
|
||||||
|
|||||||
@ -228,6 +228,7 @@ define([
|
|||||||
Cryptpad.log(data.logText);
|
Cryptpad.log(data.logText);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ctx.sframeChan.ready();
|
||||||
cb(funcs);
|
cb(funcs);
|
||||||
});
|
});
|
||||||
} };
|
} };
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user