Skip to content

Commit

Permalink
Prevent cumulative layout shift when richworkspace is loading
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mejo- committed Jun 14, 2023
1 parent c967d01 commit 254a76d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/views/RichWorkspace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 254a76d

Please sign in to comment.