From f524918a7e443bc157231f9c754ce97c8a40d2f1 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 6 Nov 2022 21:33:34 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/6493 --- app/src/menus/navigation.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/menus/navigation.ts b/app/src/menus/navigation.ts index 81f390476..c8b752cf0 100644 --- a/app/src/menus/navigation.ts +++ b/app/src/menus/navigation.ts @@ -21,11 +21,11 @@ import {openFileById} from "../editor/util"; /// #endif import {Constants} from "../constants"; import {newFile} from "../util/newFile"; -import {hasClosestByClassName} from "../protyle/util/hasClosest"; +import {hasClosestByTag} from "../protyle/util/hasClosest"; import {deleteFiles} from "../editor/deleteFile"; export const initNavigationMenu = (liElement: HTMLElement) => { - const fileElement = hasClosestByClassName(liElement, "sy__file"); + const fileElement = hasClosestByTag(liElement, "DIV"); if (!fileElement) { return; } @@ -142,7 +142,7 @@ export const initNavigationMenu = (liElement: HTMLElement) => { }; export const initFileMenu = (notebookId: string, pathString: string, liElement: Element) => { - const fileElement = hasClosestByClassName(liElement, "sy__file"); + const fileElement = hasClosestByTag(liElement, "DIV"); if (!fileElement) { return; }