From ff0514a7dc74654f20a87ee1af7816df91db3225 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 2 Feb 2025 18:35:41 +0200 Subject: [PATCH] fix(in-app-help): jumping to headings in table of contents --- src/public/app/widgets/toc.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/public/app/widgets/toc.js b/src/public/app/widgets/toc.js index 7eeed355c..ab221edd6 100644 --- a/src/public/app/widgets/toc.js +++ b/src/public/app/widgets/toc.js @@ -270,10 +270,11 @@ export default class TocWidget extends RightPanelWidget { // intervening events, do the readonly calculation at navigation // time and not at outline creation time // See https://github.com/zadam/trilium/issues/2828 + const isDocNote = this.note.type === "doc"; const isReadOnly = await this.noteContext.isReadOnly(); let $container; - if (isReadOnly) { + if (isReadOnly || isDocNote) { $container = await this.noteContext.getContentElement(); } else { const textEditor = await this.noteContext.getTextEditor();