mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
TOC scrolls smoothly (on readonly), #3911
This commit is contained in:
parent
c4a2ff5fa1
commit
331d280075
@ -176,7 +176,7 @@ export default class TocWidget extends RightPanelWidget {
|
|||||||
const headingElement = $container.find(":header")[headingIndex];
|
const headingElement = $container.find(":header")[headingIndex];
|
||||||
|
|
||||||
if (headingElement != null) {
|
if (headingElement != null) {
|
||||||
headingElement.scrollIntoView();
|
headingElement.scrollIntoView({ behavior: "smooth" });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const textEditor = await this.noteContext.getTextEditor();
|
const textEditor = await this.noteContext.getTextEditor();
|
||||||
@ -302,4 +302,4 @@ class CloseTocButton extends OnClickButtonWidget {
|
|||||||
})
|
})
|
||||||
.class("icon-action close-toc");
|
.class("icon-action close-toc");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user