mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +01:00
This commit is contained in:
parent
87203b1364
commit
282ae77a8c
1 changed files with 11 additions and 3 deletions
|
|
@ -417,9 +417,17 @@ export class Gutter {
|
|||
}
|
||||
} else if (buttonElement.dataset.type !== "NodeAttributeViewRow") {
|
||||
this.renderMenu(protyle, buttonElement);
|
||||
window.siyuan.menus.menu.popup({x: gutterRect.left, y: gutterRect.bottom, isLeft: true});
|
||||
const popoverElement = hasTopClosestByClassName(protyle.element, "block__popover", true);
|
||||
window.siyuan.menus.menu.element.setAttribute("data-from", popoverElement ? popoverElement.dataset.level + "popover" : "app");
|
||||
if (!protyle.toolbar.range) {
|
||||
protyle.toolbar.range = getEditorRange(protyle.wysiwyg.element.firstElementChild);
|
||||
}
|
||||
if (isMobile()) {
|
||||
window.siyuan.menus.menu.fullscreen();
|
||||
} else {
|
||||
window.siyuan.menus.menu.popup({x: gutterRect.left, y: gutterRect.bottom, isLeft: true});
|
||||
const popoverElement = hasTopClosestByClassName(protyle.element, "block__popover", true);
|
||||
window.siyuan.menus.menu.element.setAttribute("data-from", popoverElement ? popoverElement.dataset.level + "popover" : "app");
|
||||
focusByRange(protyle.toolbar.range);
|
||||
}
|
||||
}
|
||||
}
|
||||
event.preventDefault();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue