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