Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

feat: support keep block in view

QiShaoXuanbb0219c5edaa
diff --git a/libs/components/editor-core/src/editor/selection/selection.ts b/libs/components/editor-core/src/editor/selection/selection.ts
index b66d1b5fd6..1c45060cd6 100644
--- a/libs/components/editor-core/src/editor/selection/selection.ts
+++ b/libs/components/editor-core/src/editor/selection/selection.ts
@@ -692,7 +692,7 @@ export class SelectionManager implements VirgoSelection {
this.emit(nodeId, SelectEventTypes.active, this.lastPoint);
// TODO: Optimize the related logic after implementing the scroll bar
setTimeout(() => {
- // this._editor.scrollManager.keepBlockInView(node);
+ this._editor.scrollManager.keepBlockInView(node);
}, this._scrollDelay);
} else {
console.warn('Can not find node by this id');