Skip to content

Commit

Permalink
Fix height of editor-wrapper in viewer modal on mobile
Browse files Browse the repository at this point in the history
On mobile, `#modal-container` already has `top: 50px`, so no need to add
another `top: 50px` in `#editor-container` in that case.

Also, remove `top` property from `#editor-container` in EditorWrapper
and RichWorkspace altogether. The correct place to set `top` to fit with
the header bar from a modal is ViewerComponent.

Fixes: #2203
Fixes: #2295

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Apr 19, 2022
1 parent 7ba1072 commit e6369f1
Show file tree
Hide file tree
Showing 21 changed files with 37 additions and 32 deletions.
4 changes: 2 additions & 2 deletions js/editor-collab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor-collab.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/editor-rich.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor-rich.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/files-modal.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/files-modal.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions js/text-files.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-files.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-text.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-text.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-viewer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-viewer.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/vendors.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/vendors.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@

//! momentjs.com

//! version : 2.29.3
//! version : 2.29.1
2 changes: 1 addition & 1 deletion js/vendors.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/components/EditorWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,6 @@ export default {
max-width: 100%;
height: 100%;
left: 0;
top: 50px;
margin: 0 auto;
position: relative;
background-color: var(--color-main-background);
Expand Down
12 changes: 9 additions & 3 deletions src/components/ViewerComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,15 @@ export default {
},
}
</script>
<style>
<style lang="scss">
#editor-container {
height: calc(100% - 50px);
top: 50px;
top: var(--header-height);
}
@media only screen and (max-width: 512px) {
// on mobile, modal-container has top: 50px
#editor-container {
top: auto;
}
}
</style>

0 comments on commit e6369f1

Please sign in to comment.