Skip to content

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

web: do not jump to focus the same item again

Abdullah Attaf43c2a40f5f6
diff --git a/apps/web/src/components/list-container/index.tsx b/apps/web/src/components/list-container/index.tsx
index 133676168..0abb734eb 100644
--- a/apps/web/src/components/list-container/index.tsx
+++ b/apps/web/src/components/list-container/index.tsx
@@ -46,7 +46,6 @@ import {
import { useResolvedItem } from "@notesnook/common";
import { Context } from "./types";
import { AppEventManager, AppEvents } from "../../common/app-events";
-import { useSessionState } from "../../hooks/use-session-state";
export const CustomScrollbarsVirtualList = forwardRef<
HTMLDivElement,
@@ -120,6 +119,7 @@ function ListContainer(props: ListContainerProps) {
const event = AppEventManager.subscribe(
AppEvents.revealItemInList,
(id, focus) => {
+ if (activeItem?.id === id) return;
activeItem = { id, focus };
items
.ids()