make sure that /pad is resized after loading
This commit is contained in:
parent
0abec4ddb3
commit
1c3f1a15cd
@ -678,8 +678,8 @@ define([
|
|||||||
$loading.append($container);
|
$loading.append($container);
|
||||||
$('body').append($loading);
|
$('body').append($loading);
|
||||||
};
|
};
|
||||||
common.removeLoadingScreen = function () {
|
common.removeLoadingScreen = function (cb) {
|
||||||
$('#' + LOADING).fadeOut(750);
|
$('#' + LOADING).fadeOut(750, cb);
|
||||||
};
|
};
|
||||||
common.errorLoadingScreen = function (error) {
|
common.errorLoadingScreen = function (error) {
|
||||||
$('.spinnerContainer').hide();
|
$('.spinnerContainer').hide();
|
||||||
|
|||||||
@ -62,6 +62,14 @@ define([
|
|||||||
Cryptpad: Cryptpad,
|
Cryptpad: Cryptpad,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var emitResize = APP.emitResize = function () {
|
||||||
|
var cw = $('#pad-iframe')[0].contentWindow;
|
||||||
|
|
||||||
|
var evt = cw.document.createEvent('UIEvents');
|
||||||
|
evt.initUIEvent('resize', true, false, cw, 0);
|
||||||
|
cw.dispatchEvent(evt);
|
||||||
|
};
|
||||||
|
|
||||||
var toolbar;
|
var toolbar;
|
||||||
|
|
||||||
var isNotMagicLine = function (el) {
|
var isNotMagicLine = function (el) {
|
||||||
@ -630,11 +638,6 @@ define([
|
|||||||
if (!APP.isMaximized) {
|
if (!APP.isMaximized) {
|
||||||
editor.execCommand('maximize');
|
editor.execCommand('maximize');
|
||||||
APP.isMaximized = true;
|
APP.isMaximized = true;
|
||||||
// We have to call it 3 times in Safari in order to have the editor fully maximized -_-
|
|
||||||
if ((''+window.navigator.vendor).indexOf('Apple') !== -1) {
|
|
||||||
editor.execCommand('maximize');
|
|
||||||
editor.execCommand('maximize');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.patchText = TextPatcher.create({
|
module.patchText = TextPatcher.create({
|
||||||
@ -661,7 +664,8 @@ define([
|
|||||||
console.log("Unlocking editor");
|
console.log("Unlocking editor");
|
||||||
setEditable(true);
|
setEditable(true);
|
||||||
initializing = false;
|
initializing = false;
|
||||||
Cryptpad.removeLoadingScreen();
|
Cryptpad.removeLoadingScreen(emitResize);
|
||||||
|
|
||||||
// Update the toolbar list:
|
// Update the toolbar list:
|
||||||
// Add the current user in the metadata if he has edit rights
|
// Add the current user in the metadata if he has edit rights
|
||||||
if (readOnly) { return; }
|
if (readOnly) { return; }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user