mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-01 19:49:54 +02:00
web: reset active block after scroll
This commit is contained in:
@@ -819,6 +819,11 @@ function useScrollToBlock(id: string) {
|
||||
useEffect(() => {
|
||||
if (!blockId) return;
|
||||
scrollIntoViewById(blockId);
|
||||
useEditorStore
|
||||
.getState()
|
||||
.updateSession(id, ["default", "unlocked", "deleted"], {
|
||||
activeBlockId: undefined
|
||||
});
|
||||
}, [blockId]);
|
||||
}
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ class EditorStore extends BaseStore<EditorStore> {
|
||||
|
||||
if (activeBlockId && session)
|
||||
this.updateSession(session.id, [session.type], {
|
||||
activeBlockId: activeBlockId
|
||||
activeBlockId
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user