mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
f404d7fe85
commit
c1de5e1488
4 changed files with 23 additions and 1 deletions
|
|
@ -245,6 +245,9 @@ export const openFileAttr = (attrs: IObject, focusName = "bookmark", protyle?: I
|
|||
(dialog.element.querySelector('.b3-text-field[data-name="alias"]') as HTMLInputElement).value = attrs.alias || "";
|
||||
dialog.element.addEventListener("click", (event) => {
|
||||
let target = event.target as HTMLElement;
|
||||
if (typeof event.detail === "string") {
|
||||
target = dialog.element.querySelector('.item--full[data-type="NodeAttributeView"]')
|
||||
}
|
||||
while (!target.isSameNode(dialog.element)) {
|
||||
const type = target.dataset.action;
|
||||
if (target.classList.contains("item--full")) {
|
||||
|
|
@ -342,11 +345,14 @@ export const openFileAttr = (attrs: IObject, focusName = "bookmark", protyle?: I
|
|||
}
|
||||
});
|
||||
dialog.element.querySelectorAll(".b3-text-field").forEach((item: HTMLInputElement) => {
|
||||
if (focusName === item.getAttribute("data-name")) {
|
||||
if (focusName !== "av" && focusName === item.getAttribute("data-name")) {
|
||||
item.focus();
|
||||
}
|
||||
bindAttrInput(item, attrs.id);
|
||||
});
|
||||
if (focusName === "av") {
|
||||
dialog.element.dispatchEvent(new CustomEvent("click", {detail: "av"}));
|
||||
}
|
||||
};
|
||||
|
||||
export const openAttr = (nodeElement: Element, focusName = "bookmark", protyle?: IProtyle) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue