TOC scrolls smoothly (on readonly), #3911

This commit is contained in:
zadam 2023-05-09 23:14:56 +02:00
parent c4a2ff5fa1
commit 331d280075

View File

@ -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");
}
}
}