Skip to content

Open source personal finance application

fix: prevent page jitter when opening bottom sheet

Ilya Komichev847a754357bf
diff --git a/app/components/bottomSheet/BottomSheet.vue b/app/components/bottomSheet/BottomSheet.vue
index 344a7c51..da834e80 100644
--- a/app/components/bottomSheet/BottomSheet.vue
+++ b/app/components/bottomSheet/BottomSheet.vue
@@ -1,4 +1,6 @@
<script setup lang="ts">
+import { useBodyScrollLock } from 'reka-ui'
+
import { useBottomSheetDrag } from './useBottomSheetDrag'
const props = defineProps<{
@@ -42,7 +44,7 @@ const {
settings,
})
-const isBodyLocked = useScrollLock(document.body)
+const isBodyLocked = useBodyScrollLock(false)
watch(
() => props.isShow,
@@ -89,7 +91,7 @@ const dragClasses = computed(() => [
<div
:class="overflowClasses"
:style="overlayStyles"
- class="absolute inset-0 z-10 size-full bg-(--overlay)"
+ class="pointer-events-auto absolute inset-0 z-10 size-full bg-(--overlay)"
@click="close()"
/>