Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

editor: fix scroll into view should bring heading to top

Ammar Ahmed45997dd2e423
diff --git a/packages/editor/src/utils/toc.ts b/packages/editor/src/utils/toc.ts
index 38b42d37a..62d5ca859 100644
--- a/packages/editor/src/utils/toc.ts
+++ b/packages/editor/src/utils/toc.ts
@@ -66,8 +66,8 @@ export function scrollIntoViewById(blockId: string) {
() =>
element.scrollIntoView({
behavior: "smooth",
- block: "center",
- inline: "nearest"
+ block: "start",
+ inline: "start"
}),
100
);