fix: image modal unable to select image (#459)

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
This commit is contained in:
Jason Etcovitch 2022-12-19 16:34:58 -05:00 committed by GitHub
parent ae45b8d822
commit b918ad50cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -42,7 +42,6 @@ useEventListener('keydown', (e: KeyboardEvent) => {
</ModalDialog>
<ModalDialog
v-model="isMediaPreviewOpen"
pointer-events-none
w-full max-w-full h-full max-h-full
bg-transparent border-0 shadow-none
>

View file

@ -22,14 +22,14 @@ function prev() {
function onClick(e: MouseEvent) {
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)
emit('close')
}
</script>
<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
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