mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 05:46:10 +01:00
Merge branch 'stable'
# Conflicts: # src/public/app/widgets/toc.js
This commit is contained in:
@@ -69,7 +69,8 @@ export default class TocWidget extends RightPanelWidget {
|
||||
isEnabled() {
|
||||
return super.isEnabled()
|
||||
&& this.note.type === 'text'
|
||||
&& !this.noteContext.viewScope.tocTemporarilyHidden;
|
||||
&& !this.noteContext.viewScope.tocTemporarilyHidden
|
||||
&& this.noteContext.viewScope.viewMode === 'default';
|
||||
}
|
||||
|
||||
async doRenderBody() {
|
||||
@@ -176,9 +177,7 @@ export default class TocWidget extends RightPanelWidget {
|
||||
const headingElement = $container.find(":header")[headingIndex];
|
||||
|
||||
if (headingElement != null) {
|
||||
headingElement.scrollIntoView({
|
||||
behavior: 'smooth'
|
||||
});
|
||||
headingElement.scrollIntoView({ behavior: "smooth" });
|
||||
}
|
||||
} else {
|
||||
const textEditor = await this.noteContext.getTextEditor();
|
||||
@@ -263,4 +262,4 @@ class CloseTocButton extends OnClickButtonWidget {
|
||||
})
|
||||
.class("icon-action close-toc");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user