Vanessa 2024-11-21 00:22:20 +08:00
parent 028e3118c4
commit c0b68b1e5e
5 changed files with 121 additions and 96 deletions

View file

@ -1,5 +1,5 @@
/// #if !MOBILE
import {getInstanceById} from "../layout/util";
import {getInstanceById, setPanelFocus} from "../layout/util";
import {Tab} from "../layout/Tab";
import {initSearchMenu} from "./search";
import {initDockMenu} from "./dock";
@ -68,6 +68,7 @@ export class Menus {
this.unselect();
// navigation 根上:新建文档/文件夹/取消挂在/打开文件位置
initNavigationMenu(app, target).popup({x: event.clientX, y: event.clientY});
setPanelFocus(hasClosestByClassName(target, "sy__file") as HTMLElement);
event.stopPropagation();
break;
} else if (dataType === "navigation-file") {
@ -77,6 +78,7 @@ export class Menus {
x: event.clientX,
y: event.clientY
});
setPanelFocus(hasClosestByClassName(target, "sy__file") as HTMLElement);
event.stopPropagation();
break;
} else if (dataType === "search-item") {