diff --git a/Public/TableOfContents/Infrastructure/Ui/TableOfContentsRenderer.php b/Public/TableOfContents/Infrastructure/Ui/TableOfContentsRenderer.php index 9cdf5765..16139b22 100644 --- a/Public/TableOfContents/Infrastructure/Ui/TableOfContentsRenderer.php +++ b/Public/TableOfContents/Infrastructure/Ui/TableOfContentsRenderer.php @@ -549,6 +549,12 @@ document.addEventListener('DOMContentLoaded', function() { if (sectionMap[topMostSection]) { sectionMap[topMostSection].classList.add('active'); currentActive = topMostSection; + + // Auto-scroll del TOC para mostrar el elemento activo + sectionMap[topMostSection].scrollIntoView({ + behavior: 'smooth', + block: 'nearest' + }); } } }