fix: use modal scrollock on body

This commit is contained in:
Dominik Pschenitschni 2022-11-22 12:41:21 +01:00
parent aa6e573745
commit 754d0cd8e9
Signed by: dpschen
GPG Key ID: B257AC0149F43A77
1 changed files with 2 additions and 4 deletions

View File

@ -9,7 +9,6 @@
{ 'has-overflow': overflow },
variant,
]"
ref="modal"
v-bind="$attrs"
>
<div
@ -70,7 +69,7 @@ export default {
</script>
<script lang="ts" setup>
import {ref, watchEffect} from 'vue'
import {watchEffect} from 'vue'
import {useScrollLock} from '@vueuse/core'
import CustomTransition from '@/components/misc/CustomTransition.vue'
@ -90,8 +89,7 @@ const props = withDefaults(defineProps<{
const emit = defineEmits(['close', 'submit'])
const modal = ref<HTMLElement | null>(null)
const scrollLock = useScrollLock(modal)
const scrollLock = useScrollLock(document.body)
watchEffect(() => {
scrollLock.value = props.enabled