mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-05 07:01:48 +01:00
🎨 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:
parent
067db0791f
commit
68cf4c601f
2 changed files with 4 additions and 2 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue