diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts index b6d5816d06e..907beb23c4a 100644 --- a/app/src/protyle/render/av/action.ts +++ b/app/src/protyle/render/av/action.ts @@ -43,6 +43,18 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle if (!blockElement) { return false; } + const setPageSizeElement = hasClosestByAttribute(event.target, "data-type", "set-page-size"); + if (setPageSizeElement) { + setPageSize({ + target: event.target, + protyle, + avID: blockElement.getAttribute("data-av-id"), + nodeElement: blockElement + }); + event.preventDefault(); + event.stopPropagation(); + return true; + } const loadMoreElement = hasClosestByAttribute(event.target, "data-type", "av-load-more"); if (loadMoreElement) { (blockElement.querySelector(".av__row--footer") as HTMLElement).style.transform = ""; @@ -181,16 +193,6 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle event.preventDefault(); event.stopPropagation(); return true; - } else if (type === "set-page-size") { - setPageSize({ - target, - protyle, - avID: blockElement.getAttribute("data-av-id"), - nodeElement: blockElement - }); - event.preventDefault(); - event.stopPropagation(); - return true; } else if (type === "av-add-bottom") { insertRows(blockElement, protyle, 1, blockElement.querySelector(".av__row--util").previousElementSibling.getAttribute("data-id") || ""); event.preventDefault(); diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts index 724b08d3795..5b83be19d15 100644 --- a/app/src/protyle/render/av/render.ts +++ b/app/src/protyle/render/av/render.ts @@ -264,14 +264,12 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value, rowIndex)}
-