From e4432e6feb70106ac551affdf66114d181d89961 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 17 Feb 2026 18:32:00 +0200 Subject: [PATCH] fix(code): scrolling to end triggers on all splits --- apps/client/src/widgets/type_widgets/code/Code.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/client/src/widgets/type_widgets/code/Code.tsx b/apps/client/src/widgets/type_widgets/code/Code.tsx index b3c8686fae..3c12a8036b 100644 --- a/apps/client/src/widgets/type_widgets/code/Code.tsx +++ b/apps/client/src/widgets/type_widgets/code/Code.tsx @@ -180,7 +180,8 @@ export function CodeEditor({ parentComponent, ntxId, containerRef: externalConta resolve(refToJQuerySelector(containerRef)); }); - useTriliumEvent("scrollToEnd", () => { + useTriliumEvent("scrollToEnd", ({ ntxId: eventNtxId }) => { + if (eventNtxId !== ntxId) return; const editor = codeEditorRef.current; if (!editor) return; editor.scrollToEnd();