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

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
zio/stable
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>
<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
> >

View File

@ -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