From 77beec33d21ed0c8009a77e1e0081545f6755749 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 23 Jan 2019 16:01:50 -0700 Subject: [PATCH] Fix (remove) vertical scrollbar on popups with CKEDITOR --- api/js/jsapi/egw.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/api/js/jsapi/egw.js b/api/js/jsapi/egw.js index 86e2256b0e..a2304da910 100644 --- a/api/js/jsapi/egw.js +++ b/api/js/jsapi/egw.js @@ -302,7 +302,17 @@ { // Resize popup when et2 load is done jQuery(node).on('load', function() { - window.setTimeout(resize_popup, 50); + if(typeof CKEDITOR !== 'undefined' && Object.keys(CKEDITOR.instances).length) + { + CKEDITOR.once('instanceReady',function() { + // Trigger a resize again once CKEDITOR is ready + window.resizeTo(egw_getWindowOuterWidth(), egw_getWindowOuterHeight() ); + }); + } + else + { + window.setTimeout(resize_popup, 50); + } }); } var et2 = new etemplate2(node, "EGroupware\\Api\\Etemplate::ajax_process_content");