diff --git a/static/js/tasks.js b/static/js/tasks.js index ae9f958..ec830f3 100644 --- a/static/js/tasks.js +++ b/static/js/tasks.js @@ -42,7 +42,6 @@ async function loadTasks() { renderTasks(); initSortable(); - initScrollFocus(); const currentGoal = goals.find(g => g.id === selectedGoalId); const savedTaskId = currentGoal ? currentGoal.selected_task_id : null; @@ -64,6 +63,8 @@ async function loadTasks() { selectTask(tasks[0].id); } } + + initScrollFocus(); } catch (error) { console.error("Failed to load tasks:", error); }