🎨 When a window is inactive, pressing Shift and clicking the block icon fails to open the attribute panel (#16142)

fix https://github.com/siyuan-note/siyuan/issues/15075
This commit is contained in:
Jeffrey Chen 2025-10-18 11:10:13 +08:00 committed by GitHub
parent 067db0791f
commit 68cf4c601f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -88,7 +88,8 @@ ${padHTML}
event.stopPropagation();
break;
} else if (type === "doc") {
if (window.siyuan.shiftIsPressed) {
// 不使用 window.siyuan.shiftIsPressed ,否则窗口未激活时按 Shift 点击块标无法打开属性面板 https://github.com/siyuan-note/siyuan/issues/15075
if (event.shiftKey) {
fetchPost("/api/block/getDocInfo", {
id: protyle.block.rootID
}, (response) => {

View file

@ -404,7 +404,8 @@ export class Gutter {
}
}
foldElement.classList.remove("protyle-wysiwyg--hl");
} else if (window.siyuan.shiftIsPressed && !protyle.disabled) {
} else if (event.shiftKey && !protyle.disabled) {
// 不使用 window.siyuan.shiftIsPressed ,否则窗口未激活时按 Shift 点击块标无法打开属性面板 https://github.com/siyuan-note/siyuan/issues/15075
openAttr(protyle.wysiwyg.element.querySelector(`[data-node-id="${id}"]`), "bookmark", protyle);
} else if (!window.siyuan.ctrlIsPressed && !window.siyuan.altIsPressed && !window.siyuan.shiftIsPressed) {
this.renderMenu(protyle, buttonElement);