Fix a race condition in the file app

pull/1/head
yflory 8 years ago
parent 4eeea93265
commit a57f8679c5

@ -17,28 +17,28 @@ define([
var APP = {}; var APP = {};
$(function () { $(function () {
// TODO race condition with contents() here
var ifrw = $('#pad-iframe')[0].contentWindow;
var $iframe = $('#pad-iframe').contents();
var $form = $iframe.find('#upload-form');
var $dlform = $iframe.find('#download-form');
var $label = $form.find('label');
var $progress = $iframe.find('#progress');
var $body = $iframe.find('body');
$body.on('dragover', function (e) { e.preventDefault(); }); var andThen = function () {
$body.on('drop', function (e) { e.preventDefault(); }); var ifrw = $('#pad-iframe')[0].contentWindow;
var $iframe = $('#pad-iframe').contents();
var $form = $iframe.find('#upload-form');
var $dlform = $iframe.find('#download-form');
var $label = $form.find('label');
var $progress = $iframe.find('#progress');
var $body = $iframe.find('body');
Cryptpad.addLoadingScreen(); $body.on('dragover', function (e) { e.preventDefault(); });
$body.on('drop', function (e) { e.preventDefault(); });
var Title; Cryptpad.addLoadingScreen();
var myFile; var Title;
var myDataType;
var uploadMode = false; var myFile;
var myDataType;
var uploadMode = false;
var andThen = function () {
var $bar = $iframe.find('.toolbar-container'); var $bar = $iframe.find('.toolbar-container');
var secret; var secret;

Loading…
Cancel
Save