diff --git a/src/public/app/widgets/toc.js b/src/public/app/widgets/toc.js index 5e826cf1f..3fbc29ee6 100644 --- a/src/public/app/widgets/toc.js +++ b/src/public/app/widgets/toc.js @@ -176,7 +176,7 @@ export default class TocWidget extends RightPanelWidget { const headingElement = $container.find(":header")[headingIndex]; if (headingElement != null) { - headingElement.scrollIntoView(); + headingElement.scrollIntoView({ behavior: "smooth" }); } } else { const textEditor = await this.noteContext.getTextEditor(); @@ -302,4 +302,4 @@ class CloseTocButton extends OnClickButtonWidget { }) .class("icon-action close-toc"); } -} \ No newline at end of file +}