turnero: countdown en padre para que alerta sobreviva al cerrar el modal
El iframe pasa targetMs al padre via postMessage. El padre corre su propio intervalo (5s) que dispara la notificación si el modal está cerrado. Si el iframe alcanza el 0 primero, cancela el del padre para no duplicar. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
019d2f4fb0
commit
2cd7525bb4
@@ -2180,7 +2180,7 @@ function _mpIniciarCountdown(targetMsOrMins, nextLabel, nextFirmaId) {
|
||||
if (box._mpTick) clearInterval(box._mpTick);
|
||||
|
||||
// Notificar al padre que bloquee el cierre
|
||||
try { window.parent.postMessage({ type: 'tomaProgresivaIniciada' }, '*'); } catch(e) {}
|
||||
try { window.parent.postMessage({ type: 'tomaProgresivaIniciada', targetMs: targetMs, label: nextLabel || '' }, '*'); } catch(e) {}
|
||||
|
||||
var _tcCdEl = nextFirmaId ? document.getElementById('tc-cd-' + nextFirmaId) : null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user