Fix a race condition in the slide application

pull/1/head
yflory 8 years ago
parent c322aa440e
commit 5300bc363c

@ -32,7 +32,6 @@ define([
module.spinner.show();
var ifrw = module.ifrw = $('#pad-iframe')[0].contentWindow;
var stringify = function (obj) {
return JSONSortify(obj);
};
@ -46,6 +45,7 @@ define([
};
$(function () {
var ifrw = module.ifrw = $('#pad-iframe')[0].contentWindow;
var toolbar;
var secret = Cryptpad.getSecrets();
@ -126,7 +126,7 @@ define([
var $modal = $pad.contents().find('#modal');
var $content = $pad.contents().find('#content');
Slide.setModal($modal, $content, $pad);
Slide.setModal($modal, $content, $pad, ifrw);
var enterPresentationMode = function (shouldLog) {
Slide.show(true, $textarea.val());

@ -14,14 +14,15 @@ define([
content: [],
changeHandlers: [],
};
var ifrw = $('#pad-iframe')[0].contentWindow;
var ifrw;
var $modal;
var $content;
var $pad;
Slide.setModal = function ($m, $c, $p) {
Slide.setModal = function ($m, $c, $p, iframe) {
$modal = Slide.$modal = $m;
$content = Slide.$content = $c;
$pad = Slide.$pad = $p;
ifrw = Slide.ifrw = iframe;
};
Slide.onChange = function (f) {

Loading…
Cancel
Save