mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-13 03:26:21 +01:00
Fix media alt modal not esc-able
This commit is contained in:
parent
a1b81562db
commit
c03f39b10c
2 changed files with 3 additions and 5 deletions
|
@ -24,7 +24,7 @@ export default function MediaAltModal({ alt, lang, onClose }) {
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="sheet">
|
<div class="sheet" tabindex="-1">
|
||||||
{!!onClose && (
|
{!!onClose && (
|
||||||
<button type="button" class="sheet-close outer" onClick={onClose}>
|
<button type="button" class="sheet-close outer" onClick={onClose}>
|
||||||
<Icon icon="x" />
|
<Icon icon="x" />
|
||||||
|
|
|
@ -183,10 +183,8 @@ export default function Modals() {
|
||||||
{!!snapStates.showMediaAlt && (
|
{!!snapStates.showMediaAlt && (
|
||||||
<Modal
|
<Modal
|
||||||
class="light"
|
class="light"
|
||||||
onClick={(e) => {
|
onClose={(e) => {
|
||||||
if (e.target === e.currentTarget) {
|
|
||||||
states.showMediaAlt = false;
|
states.showMediaAlt = false;
|
||||||
}
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MediaAltModal
|
<MediaAltModal
|
||||||
|
|
Loading…
Reference in a new issue