diff --git a/app/src/card/openCard.ts b/app/src/card/openCard.ts
index 7c98b3291..05f67da91 100644
--- a/app/src/card/openCard.ts
+++ b/app/src/card/openCard.ts
@@ -44,8 +44,10 @@ export const openCardByData = (cardsData: ICard[], html = "") => {
`,
- width: isMobile() ? "98vw" : "80vw",
- height: isMobile() ? "80vh" : "70vh",
+ width: isMobile() ? "100vw" : "80vw",
+ height: isMobile() ? "100vh" : "70vh",
});
(dialog.element.querySelector(".b3-dialog__scrim") as HTMLElement).style.backgroundColor = "var(--b3-theme-background)";
(dialog.element.querySelector(".b3-dialog__container") as HTMLElement).style.maxWidth = "1024px";
@@ -142,6 +144,13 @@ export const openCardByData = (cardsData: ICard[], html = "") => {
event.preventDefault();
return;
}
+ const closeElement = hasClosestByAttribute(event.target as HTMLElement, "data-type", "close");
+ if (closeElement) {
+ dialog.destroy();
+ event.stopPropagation();
+ event.preventDefault();
+ return;
+ }
let type = "";
if (typeof event.detail === "string") {
if (event.detail === "1" || event.detail === "j") {