Fix secure iframes on Edge

This commit is contained in:
yflory
2017-09-08 15:54:54 +02:00
parent 290d668ceb
commit 05793c220c
6 changed files with 27 additions and 10 deletions

View File

@@ -383,9 +383,18 @@ define([
var $avatar = $userAdmin.find('.cp-dropdown-button-title');
var oldUrl;
var loadingAvatar;
var to;
var updateButton = function () {
var myData = metadataMgr.getUserData();
if (!myData) { return; }
if (loadingAvatar) {
// Try again in 200ms
window.clearTimeout(to);
to = window.setTimeout(updateButton, 200);
return;
}
loadingAvatar = true;
var newName = myData.name;
var url = myData.avatar;
$displayName.text(newName || Messages.anonymous);
@@ -396,8 +405,11 @@ define([
if ($img) {
$userAdmin.find('button').addClass('cp-avatar');
}
loadingAvatar = false;
});
return;
}
loadingAvatar = false;
};
metadataMgr.onChange(updateButton);
updateButton();
@@ -465,12 +477,13 @@ define([
}
}
};
common.initFilePicker(common, fileDialogCfg);
common.initFilePicker(fileDialogCfg);
var pickerCfg = {
types: [type],
where: ['template']
};
common.openFilePicker(common, pickerCfg);
console.log(pickerCfg);
common.openFilePicker(pickerCfg);
};
return UI;

View File

@@ -17,6 +17,9 @@ define({
// When either the outside or inside registers a query handler, this is sent.
'EV_REGISTER_HANDLER': true,
// When an iframe is ready to receive messages
'EV_RPC_READY': true,
// Realtime events called from the outside.
// When someone joins the pad, argument is a string with their netflux id.
'EV_RT_JOIN': true,