Skip to content

Commit 6915125

Browse files
authored
fix: output button is not visible on mobile devices (#351)
1 parent 93b7d6a commit 6915125

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/App.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ const refreshPreview = () => {
121121
}
122122
123123
watch(autoSave, setAutoSaveState)
124+
125+
const setVH = () => {
126+
document.documentElement.style.setProperty('--vh', `${window.innerHeight}px`)
127+
}
128+
useEventListener('resize', setVH)
129+
setVH()
124130
</script>
125131

126132
<template>
@@ -139,6 +145,7 @@ watch(autoSave, setAutoSaveState)
139145
:store="store"
140146
:editor="Monaco"
141147
:preview-options="previewOptions"
148+
auto-resize
142149
@keydown="handleKeydown"
143150
/>
144151
<Teleport defer to=".vue-repl .right">
@@ -166,7 +173,7 @@ body {
166173
}
167174
168175
.vue-repl {
169-
height: calc(100vh - var(--nav-height)) !important;
176+
height: calc(var(--vh) - var(--nav-height)) !important;
170177
}
171178
172179
.vue-repl .right {

0 commit comments

Comments
 (0)