diff --git a/resources/scripts/components/server/console/useTerminal.spec.tsx b/resources/scripts/components/server/console/useTerminal.spec.tsx index 2f2b0b741..95792e2a0 100644 --- a/resources/scripts/components/server/console/useTerminal.spec.tsx +++ b/resources/scripts/components/server/console/useTerminal.spec.tsx @@ -171,6 +171,13 @@ describe('useTerminal', () => { expect(Object.keys(theme)).toHaveLength(22); }); + it('scrolls without easing, so new output cannot drag a scrolled-up view along', async () => { + render(); + await waitFor(() => expect(terminals).toHaveLength(1)); + + expect(terminals[0].options.smoothScrollDuration).toBe(0); + }); + it('keeps the on-screen keyboard closed when the read-only terminal takes focus', async () => { const { container } = render(); diff --git a/resources/scripts/components/server/console/useTerminal.ts b/resources/scripts/components/server/console/useTerminal.ts index 297e756bd..80b067dec 100644 --- a/resources/scripts/components/server/console/useTerminal.ts +++ b/resources/scripts/components/server/console/useTerminal.ts @@ -76,6 +76,9 @@ const terminalProps: ITerminalOptions = { cursorBlink: false, allowTransparency: true, rows: 30, + // Ghostty eases wheel scrolls toward a target it doesn't move when output arrives, so on a busy + // console each new line dragged the view forward and swallowed most of the scroll. + smoothScrollDuration: 0, }; const countLineFeeds = (data: string | Uint8Array) =>