Fix #1298
This commit is contained in:
parent
998bd02a05
commit
c0719c21f1
|
@ -1,6 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useStore } from '~/store'
|
import { useStore } from '~/store'
|
||||||
import { nextTick, onMounted, ref, computed } from 'vue'
|
import { nextTick, onMounted, ref, computed, onBeforeMount, onUnmounted } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import time from '~/utils/time'
|
import time from '~/utils/time'
|
||||||
import { useFocusTrap } from '@vueuse/integrations/useFocusTrap'
|
import { useFocusTrap } from '@vueuse/integrations/useFocusTrap'
|
||||||
|
@ -14,6 +14,14 @@ import usePlayer from '~/composables/audio/usePlayer'
|
||||||
|
|
||||||
const queueModal = ref()
|
const queueModal = ref()
|
||||||
|
|
||||||
|
let savedScroll = 0
|
||||||
|
onBeforeMount(() => (savedScroll = window.scrollY))
|
||||||
|
onUnmounted(() => {
|
||||||
|
document.body.parentElement?.setAttribute('style', 'scroll-behavior: auto')
|
||||||
|
window.scrollTo({ top: savedScroll, behavior: undefined })
|
||||||
|
document.body.parentElement?.removeAttribute('style')
|
||||||
|
})
|
||||||
|
|
||||||
const { activate } = useFocusTrap(queueModal, { allowOutsideClick: true })
|
const { activate } = useFocusTrap(queueModal, { allowOutsideClick: true })
|
||||||
activate()
|
activate()
|
||||||
|
|
||||||
|
|
|
@ -213,6 +213,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
min-width: 10em;
|
min-width: 10em;
|
||||||
|
z-index: 2;
|
||||||
> .control.button {
|
> .control.button {
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue