diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts
index bcdcfbfcf..1e1d0744b 100644
--- a/app/src/menus/protyle.ts
+++ b/app/src/menus/protyle.ts
@@ -1180,7 +1180,7 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme
iconHTML: "",
type: "readonly",
label: `
-px
+px
`,
bind(element) {
const inputElement = element.querySelector("input");
@@ -1188,11 +1188,11 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme
rangeElement.value = "0";
rangeElement.parentElement.setAttribute("aria-label", inputElement.value ? (inputElement.value + "px") : window.siyuan.languages.default);
- imgElement.style.width = inputElement.value ? (inputElement.value + "px") : "";
+ imgElement.parentElement.style.width = inputElement.value ? (inputElement.value + "px") : "";
imgElement.style.height = "";
});
inputElement.addEventListener("blur", () => {
- if (inputElement.value === imgElement.style.width.replace("px", "")) {
+ if (inputElement.value === imgElement.parentElement.style.width.replace("px", "")) {
return;
}
nodeElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss"));
@@ -1212,13 +1212,14 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme
}, {
iconHTML: "",
type: "readonly",
- label: `