fix(code): scrolling to end triggers on all splits

This commit is contained in:
Elian Doran 2026-02-17 18:32:00 +02:00
parent d8275e7ea8
commit e4432e6feb
No known key found for this signature in database

View File

@ -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();