1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-23 14:46:08 +09:00

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