From 43ce6efed217891ca139b2cb77e6b2936b1e740e Mon Sep 17 00:00:00 2001 From: Quorafind Date: Sat, 28 Nov 2026 14:53:05 +0800 Subject: [PATCH] fix(lint): reset inline styles without static style assignments The Obsidian review action raises obsidianmd/no-static-styles-assignment to an error, and it flags assigning a string literal to element.style.*, including the empty string used to clear a value. - SettingsModal: settings search hides sidebar groups with group.toggle(); restore them with group.show() instead of writing style.display = "". - InlineEditor: clear the textarea's inline height with style.removeProperty("height") before measuring scrollHeight. --- src/components/features/settings/SettingsModal.ts | 2 +- src/components/features/task/view/InlineEditor.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/features/settings/SettingsModal.ts b/src/components/features/settings/SettingsModal.ts index feb1b97c..44dacefd 100644 --- a/src/components/features/settings/SettingsModal.ts +++ b/src/components/features/settings/SettingsModal.ts @@ -1016,7 +1016,7 @@ export class SettingsModal extends Modal { ".vertical-tab-header-group", ); groups.forEach((group: HTMLElement) => { - group.style.display = ""; + group.show(); }); } diff --git a/src/components/features/task/view/InlineEditor.ts b/src/components/features/task/view/InlineEditor.ts index 94b66a71..10e3d257 100644 --- a/src/components/features/task/view/InlineEditor.ts +++ b/src/components/features/task/view/InlineEditor.ts @@ -991,7 +991,7 @@ export class InlineEditor extends Component { private autoResizeTextarea(textarea: HTMLTextAreaElement): void { // Clear the inline height so `.inline-content-editor { height: auto }` // applies while measuring - textarea.style.height = ""; + textarea.style.removeProperty("height"); textarea.style.height = textarea.scrollHeight + "px"; }