fix (client): do not close alt text form by bg click (#10972)

This commit is contained in:
naskya 2024-08-18 14:57:08 +09:00
parent 57f4e95279
commit 6af0aaf3ff
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -1,5 +1,5 @@
<template>
<MkModal ref="modal" @click="done(true)" @closed="emit('closed')">
<MkModal ref="modal">
<div class="container">
<div class="fullwidth top-caption">
<div class="mk-dialog">
@ -50,7 +50,6 @@
:src="image.url"
:alt="image.comment || undefined"
:title="image.comment || undefined"
@click="modal!.close()"
/>
<footer>
<span>{{ image.type }}</span>
@ -89,13 +88,11 @@ const props = withDefaults(
showOkButton?: boolean;
showCaptionButton?: boolean;
showCancelButton?: boolean;
cancelableByBgClick?: boolean;
}>(),
{
showOkButton: true,
showCaptionButton: true,
showCancelButton: true,
cancelableByBgClick: true,
},
);
@ -130,12 +127,6 @@ function cancel() {
done(true);
}
// function onBgClick() {
// if (props.cancelableByBgClick) {
// cancel();
// }
// }
function onKeydown(evt) {
if (evt.which === 27) {
// ESC