From 15af63b0f894e49520e2e5ee4a676db98dfd0f40 Mon Sep 17 00:00:00 2001 From: Sebastian Castro Date: Tue, 28 Apr 2020 16:14:00 +0200 Subject: [PATCH] ui: display editor only when it is ready so it avoid strange ui effect when div get positioned --- src/static/css/pad/layout.css | 3 +++ src/static/js/pad.js | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/static/css/pad/layout.css b/src/static/css/pad/layout.css index 0d583f329..84c128149 100644 --- a/src/static/css/pad/layout.css +++ b/src/static/css/pad/layout.css @@ -29,6 +29,9 @@ body { height: auto; flex: 1 auto; } +#editorcontainerbox #editorcontainer:not(.initialized) { + visibility: hidden; +} #editorcontainerbox #editorcontainer iframe { width: 100%; height: auto; diff --git a/src/static/js/pad.js b/src/static/js/pad.js index 622b57f3e..aeeca15c6 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -573,6 +573,8 @@ var pad = { mobileMatch.addListener(checkChatAndUsersVisibility); // check if window resized setTimeout(function() { checkChatAndUsersVisibility(mobileMatch); }, 0); // check now after load + $('#editorcontainer').addClass('initialized'); + hooks.aCallAll("postAceInit", {ace: padeditor.ace, pad: pad}); } },