Fix setting progress through progressbar

This commit is contained in:
wvffle 2022-09-05 14:54:38 +00:00 committed by Georg Krause
parent ad2e04469a
commit 711aa783b3
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ router.beforeEach(() => store.commit('ui/queueFocused', null))
const progressBar = ref()
const touchProgress = (event: MouseEvent) => {
const time = ((event.clientX - (event.target as Element).getBoundingClientRect().left) / progressBar.value.offsetWidth) * duration.value
const time = ((event.clientX - ((event.target as Element).closest('.progress')?.getBoundingClientRect().left ?? 0)) / progressBar.value.offsetWidth) * duration.value
currentTime.value = time
}