From 73c20272e58d8fca23d2ece5e9159901d467fafa Mon Sep 17 00:00:00 2001 From: root Date: Sun, 5 Jul 2026 21:25:35 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20ao=20fechar=20preview=20do=20relat=C3=B3?= =?UTF-8?q?rio,=20reabrir=20modal=20de=20confirma=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/index.html b/src/index.html index 9b9c631..df4cf9e 100644 --- a/src/index.html +++ b/src/index.html @@ -1833,8 +1833,15 @@ function openPrintPreview(data, mode) { background: #444; color: #fff; border: none; border-radius: 6px; font-size: 15px; cursor: pointer; `; + // Salva qual modal estava aberto antes do preview (para reabrir ao fechar) + const modalConfirmOpen = document.getElementById('modal-confirm')?.classList.contains('open'); + btnFechar.onclick = () => { document.body.removeChild(overlay); + // Se o modal de confirmação estava aberto antes, reabre ele + if (modalConfirmOpen) { + document.getElementById('modal-confirm').classList.add('open'); + } }; const btnImprimir = document.createElement('button');