diff --git a/app/src/search/util.ts b/app/src/search/util.ts index 5de62143c..b2821efe4 100644 --- a/app/src/search/util.ts +++ b/app/src/search/util.ts @@ -871,7 +871,7 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo id, position: "right", action: foldResponse.data ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL] : - (id === target.getAttribute("data-root-id") ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ROOTSCROLL] : [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT]), + (id === currentList.getAttribute("data-root-id") ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ROOTSCROLL] : [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT]), zoomIn: foldResponse.data }); if (closeCB) { @@ -901,7 +901,7 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo app, id, action: foldResponse.data ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL] : - (id === target.getAttribute("data-root-id") ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ROOTSCROLL] : [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT]), + (id === currentList.getAttribute("data-root-id") ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ROOTSCROLL] : [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT]), zoomIn: foldResponse.data }); if (closeCB) {