From 2e2e2f331b708126a1d4f607aac5ff3464507a7f Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 1 Dec 2024 12:18:41 +0800 Subject: [PATCH] :lipstick: https://github.com/siyuan-note/siyuan/issues/13311 --- app/src/menus/protyle.ts | 2 +- app/src/protyle/header/Background.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index 9b413e19f..e5743b9e5 100644 --- a/app/src/menus/protyle.ts +++ b/app/src/menus/protyle.ts @@ -1835,7 +1835,7 @@ const genImageHeightMenu = (label: string, imgElement: HTMLElement, protyle: IPr click() { nodeElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss")); imgElement.style.height = label === window.siyuan.languages.default ? "" : parseInt(label) + "vh"; - imgElement.style.width = ""; + imgElement.parentElement.style.width = ""; updateTransaction(protyle, id, nodeElement.outerHTML, html); focusBlock(nodeElement); } diff --git a/app/src/protyle/header/Background.ts b/app/src/protyle/header/Background.ts index 74ebc7c9a..acb68d51f 100644 --- a/app/src/protyle/header/Background.ts +++ b/app/src/protyle/header/Background.ts @@ -444,6 +444,9 @@ export class Background { let html = ""; const colors = ["secondary", "primary", "info", "success", "warning", "error", "pink"]; tags.split(",").forEach((item, index) => { + if (!item) { + return; + } html += `
${escapeHtml(item)}
`; }); this.tagsElement.innerHTML = `${html}