fix: image modal unable to select image (#459)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
This commit is contained in:
parent
ae45b8d822
commit
b918ad50cf
|
@ -42,7 +42,6 @@ useEventListener('keydown', (e: KeyboardEvent) => {
|
||||||
</ModalDialog>
|
</ModalDialog>
|
||||||
<ModalDialog
|
<ModalDialog
|
||||||
v-model="isMediaPreviewOpen"
|
v-model="isMediaPreviewOpen"
|
||||||
pointer-events-none
|
|
||||||
w-full max-w-full h-full max-h-full
|
w-full max-w-full h-full max-h-full
|
||||||
bg-transparent border-0 shadow-none
|
bg-transparent border-0 shadow-none
|
||||||
>
|
>
|
||||||
|
|
|
@ -22,14 +22,14 @@ function prev() {
|
||||||
|
|
||||||
function onClick(e: MouseEvent) {
|
function onClick(e: MouseEvent) {
|
||||||
const path = e.composedPath() as HTMLElement[]
|
const path = e.composedPath() as HTMLElement[]
|
||||||
const el = path.find(el => ['A', 'BUTTON', 'IMG', 'VIDEO'].includes(el.tagName?.toUpperCase()))
|
const el = path.find(el => ['A', 'BUTTON', 'IMG', 'VIDEO', 'P'].includes(el.tagName?.toUpperCase()))
|
||||||
if (!el)
|
if (!el)
|
||||||
emit('close')
|
emit('close')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div relative h-full w-full flex select-none pointer-events-none pt-12>
|
<div relative h-full w-full flex pt-12 @click="onClick">
|
||||||
<button
|
<button
|
||||||
v-if="hasNext" pointer-events-auto btn-action-icon bg="black/20" :aria-label="$t('action.previous')"
|
v-if="hasNext" pointer-events-auto btn-action-icon bg="black/20" :aria-label="$t('action.previous')"
|
||||||
hover:bg="black/40" dark:bg="white/30" dark:hover:bg="white/20" absolute top="1/2" right-1
|
hover:bg="black/40" dark:bg="white/30" dark:hover:bg="white/20" absolute top="1/2" right-1
|
||||||
|
|
Loading…
Reference in a new issue