diff --git a/src/renderer/hooks/keyboard/useMainKeyboardHandler.ts b/src/renderer/hooks/keyboard/useMainKeyboardHandler.ts index 8a45963b..953edbcb 100644 --- a/src/renderer/hooks/keyboard/useMainKeyboardHandler.ts +++ b/src/renderer/hooks/keyboard/useMainKeyboardHandler.ts @@ -405,7 +405,12 @@ export function useMainKeyboardHandler(): UseMainKeyboardHandlerReturn { } else if (ctx.isShortcut(e, 'jumpToBottom')) { e.preventDefault(); // Jump to the bottom of the current main panel output (AI logs or terminal output) - ctx.logsEndRef.current?.scrollIntoView({ behavior: 'instant' }); + // Find the scroll container (parent of logsEndRef) and scroll to bottom + // Using scrollTo() instead of scrollIntoView() for reliable scrolling in nested containers + const scrollContainer = ctx.logsEndRef.current?.parentElement; + if (scrollContainer) { + scrollContainer.scrollTo({ top: scrollContainer.scrollHeight, behavior: 'instant' }); + } trackShortcut('jumpToBottom'); } else if (ctx.isShortcut(e, 'toggleMarkdownMode')) { // Toggle markdown raw mode for AI message history