Skip to content

Commit 26c48a9

Browse files
committed
fix(editor): No scrollbar on mobile with short content
I spent some time trying to figure out where the extra 8px came from that created the scrollbar even with short content on mobile. In the end this seems like an acceptable workaround for now. Signed-off-by: Jonas <jonas@freesources.org>
1 parent 58338f1 commit 26c48a9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/components/Editor.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
ref="el"
99
data-text-el="editor-container"
1010
class="text-editor"
11+
:class="{ 'is-mobile': isMobile }"
1112
tabindex="-1"
1213
@keydown.stop="onKeyDown">
1314
<SkeletonLoading v-if="showLoadingSkeleton" />
@@ -913,6 +914,13 @@ export default {
913914
.modal-container .text-editor {
914915
top: 0;
915916
height: calc(100vh - var(--header-height));
917+
918+
&.is-mobile {
919+
// TODO: Why is this required to prevent small scrolling container on mobile with short content?
920+
height: calc(
921+
100vh - var(--header-height) - 2 * var(--default-grid-baseline)
922+
);
923+
}
916924
}
917925
918926
.text-editor {

0 commit comments

Comments
 (0)