diff --git a/ver_formulario_enviado.php b/ver_formulario_enviado.php index 0628da1..74c4c5b 100644 --- a/ver_formulario_enviado.php +++ b/ver_formulario_enviado.php @@ -1963,13 +1963,15 @@ function _mpRefreshCards(signedFid, nextFid) { document.addEventListener('DOMContentLoaded', function() { _mpRenderCards(); setTimeout(function() { + var fw = document.querySelector('.firma-pro-widget:not([style*="display:none"])'); + if (!fw) return; + // Siempre auto-llenar la hora (incluso en Minuto 0 sin firmas previas) + _mpAutoFillHora(fw.dataset.campo); + // Solo hacer scroll si ya hay alguna firma iniciada var hayFirmaIniciada = Object.keys(window._mpSavedFirmas || {}).length > 0 || !!document.querySelector('.firma-box img'); - if (!hayFirmaIniciada) return; - var fw = document.querySelector('.firma-pro-widget:not([style*="display:none"])'); - if (fw) { + if (hayFirmaIniciada) { fw.scrollIntoView({ behavior: 'smooth', block: 'start' }); - _mpAutoFillHora(fw.dataset.campo); } }, 350); });