🎨 Improve #commonMenu menu (#16147)

This commit is contained in:
Jeffrey Chen 2025-10-18 22:09:56 +08:00 committed by GitHub
parent 2c23d05c7c
commit 3922ca0cd4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 17 additions and 11 deletions

View file

@ -228,7 +228,7 @@ export class BlockPanel {
this.targetElement = undefined;
// 移除弹出上使用右键菜单
const menuLevel = parseInt(window.siyuan.menus.menu.element.dataset.from);
if (window.siyuan.menus.menu.element.dataset.from !== "app" && menuLevel && menuLevel >= level) {
if (menuLevel && menuLevel >= level && window.siyuan.menus.menu.element.dataset.from.includes("popover")) {
// https://github.com/siyuan-note/siyuan/issues/9854 右键菜单不是从浮窗中弹出的则不进行移除
window.siyuan.menus.menu.remove();
}