mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
This commit is contained in:
parent
7994ea861a
commit
d20b009dba
2 changed files with 21 additions and 2 deletions
|
|
@ -125,8 +125,8 @@ export class BlockPanel {
|
|||
} else if (type === "stickTab") {
|
||||
checkFold(this.refDefs[0].refID, (zoomIn, action) => {
|
||||
openFileById({
|
||||
app:options.app,
|
||||
id:this.refDefs[0].refID,
|
||||
app: options.app,
|
||||
id: this.refDefs[0].refID,
|
||||
action,
|
||||
zoomIn,
|
||||
openNewTab: true
|
||||
|
|
|
|||
|
|
@ -272,7 +272,16 @@ const hidePopover = (event: MouseEvent & { path: HTMLElement[] }) => {
|
|||
itemLevel > parseInt(blockElement.getAttribute("data-level"))) {
|
||||
if (menuLevel && menuLevel >= itemLevel) {
|
||||
// 有 gutter 菜单时不隐藏
|
||||
break;
|
||||
} else {
|
||||
const hasToolbar = item.editors.find(editItem => {
|
||||
if (!editItem.protyle.toolbar.subElement.classList.contains("fn__none")) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (hasToolbar) {
|
||||
break;
|
||||
}
|
||||
item.destroy();
|
||||
}
|
||||
}
|
||||
|
|
@ -284,10 +293,20 @@ const hidePopover = (event: MouseEvent & { path: HTMLElement[] }) => {
|
|||
if ((item.targetElement || typeof item.x === "number") && item.element.getAttribute("data-pin") === "false") {
|
||||
if (menuLevel && menuLevel >= itemLevel) {
|
||||
// 有 gutter 菜单时不隐藏
|
||||
break;
|
||||
} else if (item.targetElement && item.targetElement.classList.contains("protyle-wysiwyg__embed") &&
|
||||
item.targetElement.contains(targetElement)) {
|
||||
// 点击嵌入块后浮窗消失后再快速点击嵌入块无法弹出浮窗 https://github.com/siyuan-note/siyuan/issues/12511
|
||||
break;
|
||||
} else {
|
||||
const hasToolbar = item.editors.find(editItem => {
|
||||
if (!editItem.protyle.toolbar.subElement.classList.contains("fn__none")) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (hasToolbar) {
|
||||
break;
|
||||
}
|
||||
item.destroy();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue