From 1bb853513c2ae689c8c5a73eb8ce71206970d5d6 Mon Sep 17 00:00:00 2001 From: JonathanLab Date: Mon, 26 Jan 2026 13:26:45 +0100 Subject: [PATCH] fix: scroll chatbox to cursor on newline insertion When pressing shift+enter to create new lines in the chatbox, the scrollview now automatically scrolls to keep the cursor visible. --- .../renderer/features/message-editor/tiptap/useTiptapEditor.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/twig/src/renderer/features/message-editor/tiptap/useTiptapEditor.ts b/apps/twig/src/renderer/features/message-editor/tiptap/useTiptapEditor.ts index 19067eb20..fb8ad0b05 100644 --- a/apps/twig/src/renderer/features/message-editor/tiptap/useTiptapEditor.ts +++ b/apps/twig/src/renderer/features/message-editor/tiptap/useTiptapEditor.ts @@ -292,6 +292,8 @@ export function useTiptapEditor(options: UseTiptapEditorOptions) { } draftRef.current?.saveDraft(e); + + e.commands.scrollIntoView(); }, }, [sessionId, disabled, fileMentions, commands, placeholder],