Merge pull request #279 from ThanhNguyxn/fix/jump-to-bottom-shortcut

fix: Jump to Bottom shortcut (Cmd+Shift+J) now works
This commit is contained in:
Pedram Amini
2026-02-05 14:52:37 -06:00
committed by GitHub

View File

@@ -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