Skip to content

Commit 87f2ddf

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 7e18c18 commit 87f2ddf

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
@@ -9,6 +9,7 @@
99
ref="el"
1010
data-text-el="editor-container"
1111
class="text-editor"
12+
:class="{ 'is-mobile': isMobile }"
1213
tabindex="-1"
1314
@keydown.stop="onKeyDown">
1415
<SkeletonLoading v-if="showLoadingSkeleton" />
@@ -970,6 +971,13 @@ export default {
970971
.modal-container .text-editor {
971972
top: 0;
972973
height: calc(100vh - var(--header-height));
974+
975+
&.is-mobile {
976+
// TODO: Why is this required to prevent small scrolling container on mobile with short content?
977+
height: calc(
978+
100vh - var(--header-height) - 2 * var(--default-grid-baseline)
979+
);
980+
}
973981
}
974982
975983
.text-editor {

0 commit comments

Comments
 (0)