Skip to content

Commit edc1272

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 0f9ef82 commit edc1272

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

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" />
@@ -912,6 +913,13 @@ export default {
912913
.modal-container .text-editor {
913914
top: 0;
914915
height: calc(100vh - var(--header-height));
916+
917+
&.is-mobile {
918+
// TODO: Why is this required to prevent small scrolling container on mobile with short content?
919+
height: calc(
920+
100vh - var(--header-height) - 2 * var(--default-grid-baseline)
921+
);
922+
}
915923
}
916924
917925
.text-editor {

0 commit comments

Comments
 (0)