This commit is contained in:
parent
29f744c7e0
commit
a3ff944216
2 changed files with 6 additions and 1 deletions
|
@ -8,7 +8,7 @@ import {setEditMode} from "../util/setEditMode";
|
|||
import {RecordMedia} from "../util/RecordMedia";
|
||||
import {hideMessage, showMessage} from "../../dialog/message";
|
||||
import {uploadFiles} from "../upload";
|
||||
import {hasClosestBlock, hasClosestByAttribute} from "../util/hasClosest";
|
||||
import {hasClosestBlock, hasClosestByAttribute, hasTopClosestByClassName} from "../util/hasClosest";
|
||||
import {needSubscribe} from "../../util/needSubscribe";
|
||||
import {isMobile} from "../../util/functions";
|
||||
import {zoomOut} from "../../menus/protyle";
|
||||
|
@ -582,6 +582,8 @@ ${padHTML}
|
|||
/// #else
|
||||
window.siyuan.menus.menu.popup(position);
|
||||
/// #endif
|
||||
const popoverElement = hasTopClosestByClassName(protyle.element, "block__popover", true);
|
||||
window.siyuan.menus.menu.element.setAttribute("data-from", popoverElement ? popoverElement.dataset.level + "popover" : "app");
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ import {genImportMenu} from "../../menus/navigation";
|
|||
import {transferBlockRef} from "../../menus/block";
|
||||
import {addEditorToDatabase} from "../render/av/addToDatabase";
|
||||
import {openFileById} from "../../editor/util";
|
||||
import {hasTopClosestByClassName} from "../util/hasClosest";
|
||||
|
||||
export const openTitleMenu = (protyle: IProtyle, position: IPosition) => {
|
||||
hideTooltip();
|
||||
|
@ -287,5 +288,7 @@ export const openTitleMenu = (protyle: IProtyle, position: IPosition) => {
|
|||
/// #else
|
||||
window.siyuan.menus.menu.popup(position);
|
||||
/// #endif
|
||||
const popoverElement = hasTopClosestByClassName(protyle.element, "block__popover", true);
|
||||
window.siyuan.menus.menu.element.setAttribute("data-from", popoverElement ? popoverElement.dataset.level + "popover" : "app");
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue