Vanessa 2025-09-04 18:23:51 +08:00
parent e91a37a98b
commit ba95f45b92
3 changed files with 5 additions and 0 deletions

View file

@ -517,6 +517,9 @@ export const popTextCell = (protyle: IProtyle, cellElements: HTMLElement[], type
html = `<input type="number" spellcheck="false" value="${cellElements[0].firstElementChild.getAttribute("data-content")}" ${style} class="b3-text-field">`; html = `<input type="number" spellcheck="false" value="${cellElements[0].firstElementChild.getAttribute("data-content")}" ${style} class="b3-text-field">`;
} else { } else {
if (["select", "mSelect"].includes(type)) { if (["select", "mSelect"].includes(type)) {
if (blockElement.getAttribute("data-rendering") === "true") {
return;
}
openMenuPanel({protyle, blockElement, type: "select", cellElements}); openMenuPanel({protyle, blockElement, type: "select", cellElements});
} else if (type === "mAsset") { } else if (type === "mAsset") {
openMenuPanel({protyle, blockElement, type: "asset", cellElements}); openMenuPanel({protyle, blockElement, type: "asset", cellElements});

View file

@ -451,6 +451,7 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: (data: IAV) =
} }
if (avElements.length > 0) { if (avElements.length > 0) {
avElements.forEach((e: HTMLElement) => { avElements.forEach((e: HTMLElement) => {
e.removeAttribute("data-rendering");
if (e.getAttribute("data-render") === "true" || hasClosestByClassName(e, "av__gallery-content")) { if (e.getAttribute("data-render") === "true" || hasClosestByClassName(e, "av__gallery-content")) {
return; return;
} }

View file

@ -633,6 +633,7 @@ export const addColOptionOrCell = (protyle: IProtyle, data: IAV, cellElements: H
transaction(protyle, cellDoOperations, cellUndoOperations); transaction(protyle, cellDoOperations, cellUndoOperations);
} }
if (colData.type === "select") { if (colData.type === "select") {
blockElement.setAttribute("data-rendering", "true");
menuElement.parentElement.dispatchEvent(new CustomEvent("click", {detail: "close"})); menuElement.parentElement.dispatchEvent(new CustomEvent("click", {detail: "close"}));
} else { } else {
const oldScroll = menuElement.querySelector(".b3-menu__items").scrollTop; const oldScroll = menuElement.querySelector(".b3-menu__items").scrollTop;