Skip to content

Commit 8345744

Browse files
committed
When a new job is added, don't scroll the stopped logged window being hovered over
This fixes: "when you hover over a log window, it stops scrolling as intended, but each time a new job is added at the top of the dashboard, the log window scrolls to the bottom. I'm pretty sure this wasn't the case before [...]." Diagnosis: `JobsRenderer._createLogContainer` calls `this.applyFilter()`; `applyFilter` was scrolling all the log windows (with the intention of scrolling log windows made newly visible by the filter), but neglected to check whether they were `log-window-stopped`.
1 parent b22627e commit 8345744

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

dashboard/assets/scripts/dashboard.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,10 @@ class JobsRenderer {
663663
// Hidden log windows aren't scrolled down while lines are added to them,
664664
// but now that more are visible, we need to scroll them to the bottom.
665665
for (const w of matchedWindows) {
666+
// Don't scroll log windows we're mousing over
667+
if (w.classList.contains("log-window-stopped")) {
668+
continue;
669+
}
666670
scrollToBottom(w);
667671
}
668672
}

0 commit comments

Comments
 (0)