From 1044531806173a1a0ce39f41af6734196b7d966e Mon Sep 17 00:00:00 2001 From: Caleb James DeLisle Date: Wed, 30 Aug 2017 11:04:52 +0200 Subject: [PATCH 1/3] Fix Safari iframe size issue --- www/pad/inner.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/www/pad/inner.js b/www/pad/inner.js index 48c901d69..28bfd6fa0 100644 --- a/www/pad/inner.js +++ b/www/pad/inner.js @@ -773,11 +773,18 @@ define([ } // Used in ckeditor-config.js Ckeditor.CRYPTPAD_URLARGS = ApiConfig.requireConf.urlArgs; - editor = Ckeditor.replace('editor1', { + module.ckeditor = editor = Ckeditor.replace('editor1', { customConfig: '/customize/ckeditor-config.js', }); editor.on('instanceReady', waitFor()); }).nThen(function (/*waitFor*/) { + if (Ckeditor.env.safari) { + var fixIframe = function () { + $('iframe.cke_wysiwyg_frame').height($('#cke_1_contents').height()); + }; + $(window).resize(fixIframe); + fixIframe(); + } Links.addSupportForOpeningLinksInNewTab(Ckeditor)({editor: editor}); Cryptpad.onError(function (info) { if (info && info.type === "store") { From 7498057c8998c29fdd3b903c4e45ac2dc42b73e6 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 30 Aug 2017 11:11:43 +0200 Subject: [PATCH 2/3] Fix Safari iframe size --- customize.dist/src/less/toolbar.less | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/customize.dist/src/less/toolbar.less b/customize.dist/src/less/toolbar.less index cbbbd9dd2..7e28c08d3 100644 --- a/customize.dist/src/less/toolbar.less +++ b/customize.dist/src/less/toolbar.less @@ -43,8 +43,6 @@ right: 0; display: flex; flex-flow: column; - height: 100vh; - width: 100vw; } .cke_toolbox_main { display: inline-block; @@ -56,7 +54,7 @@ display: flex; overflow: visible; iframe { - height: 100%; + min-height: 100%; width: 100%; } } From 4db4f667866da6dee53944e1d3d29589d60e0144 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 30 Aug 2017 11:14:58 +0200 Subject: [PATCH 3/3] Remove an unnecessary fix for Safari --- www/pad/inner.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/pad/inner.js b/www/pad/inner.js index 28bfd6fa0..badb215fa 100644 --- a/www/pad/inner.js +++ b/www/pad/inner.js @@ -778,13 +778,13 @@ define([ }); editor.on('instanceReady', waitFor()); }).nThen(function (/*waitFor*/) { - if (Ckeditor.env.safari) { + /*if (Ckeditor.env.safari) { var fixIframe = function () { $('iframe.cke_wysiwyg_frame').height($('#cke_1_contents').height()); }; $(window).resize(fixIframe); fixIframe(); - } + }*/ Links.addSupportForOpeningLinksInNewTab(Ckeditor)({editor: editor}); Cryptpad.onError(function (info) { if (info && info.type === "store") {