From 254a76dcc7afe4fe61cbf98ed821cae7d5988d3b Mon Sep 17 00:00:00 2001 From: Jonas Date: Wed, 7 Jun 2023 18:23:31 +0200 Subject: [PATCH] Prevent cumulative layout shift when richworkspace is loading Instead of only increasing editor height with growing document length, let's stick to a fixed height (25vh) and use that one already while loading the document. The editor still increases when it gets focused. Fixes: #2834 Fixes: #2803 Signed-off-by: Jonas --- src/views/RichWorkspace.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/views/RichWorkspace.vue b/src/views/RichWorkspace.vue index 3c0c123e708..04d96593728 100644 --- a/src/views/RichWorkspace.vue +++ b/src/views/RichWorkspace.vue @@ -259,11 +259,13 @@ export default { } #rich-workspace.focus { + min-height: 25vh; max-height: 50vh; } - #rich-workspace:not(.focus) { - max-height: 30vh; + #rich-workspace:not(.focus), #rich-workspace.icon-loading { + min-height: 25vh; + max-height: 25vh; position: relative; overflow: hidden; }