In terminal.ts a scrollToBottom() call is made after each write().
|
// Phase 2: Auto-scroll to bottom on new output (xterm.js behavior) |
|
if (this.viewportY !== 0) { |
|
this.scrollToBottom(); |
|
} |
Even if the user scrolls up, the terminal just scrolls back to the bottom on the next write. Imagine that there's a log being streamed through a websocket and the user temporarily wants to scroll back for something that was written to the terminal earlier. They have a small window to do that, before the next line gets written and it scrolls to the bottom again.
xterm.js had this same issue and was eventually handled.
In
terminal.tsascrollToBottom()call is made after eachwrite().ghostty-web/lib/terminal.ts
Lines 573 to 576 in 03ead6e
Even if the user scrolls up, the terminal just scrolls back to the bottom on the next write. Imagine that there's a log being streamed through a websocket and the user temporarily wants to scroll back for something that was written to the terminal earlier. They have a small window to do that, before the next line gets written and it scrolls to the bottom again.
xterm.js had this same issue and was eventually handled.