diff --git a/private/js/edit-project.js b/private/js/edit-project.js index 07e6749..54c04a6 100644 --- a/private/js/edit-project.js +++ b/private/js/edit-project.js @@ -433,6 +433,11 @@ function updateHash(activityId) { } else { location.hash = activityId; } + + const element = document.getElementById(activityId); + if (element) { + element.scrollIntoView({ behavior: 'smooth' }); + } } function toggleNav() { @@ -516,4 +521,4 @@ window.addEventListener('hashchange', () => { }); // Debounced version of saveProgress -const debouncedSaveProgress = debounce(saveProgress, 2000); \ No newline at end of file +const debouncedSaveProgress = debounce(saveProgress, 2000);