From 0aa5851549bae818f501aad7a9bf47bf0afae38a Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Sat, 27 Jun 2026 13:05:31 -0400 Subject: [PATCH] Fix editor line-height mismatch caused by Unraid SPA CSS override MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unraid 7's React CSS overrides line-height: 1.5 on textareas to normal. vvRestoreEditorPrefs() only called vvFontSize() for non-default sizes, so the inline style that overrides Unraid's CSS was never set for the default 12px case — leaving Firefox to render at ~14px while our code calculated positions at 18px, putting the cursor 2-3 lines above where clicked. Now always calls vvFontSize() so the inline lineHeight is always forced. --- Plugin/unraid/pages/scheduler.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Plugin/unraid/pages/scheduler.php b/Plugin/unraid/pages/scheduler.php index 7f403eb..4fb215b 100644 --- a/Plugin/unraid/pages/scheduler.php +++ b/Plugin/unraid/pages/scheduler.php @@ -3059,13 +3059,8 @@ function vvFontSize(delta) { function vvRestoreEditorPrefs() { const saved = parseInt(localStorage.getItem('vv-editor-fontsize') || '12') || 12; - if (saved !== 12) { - vvFontSizePx = 12; // reset so vvFontSize applies the delta correctly - vvFontSize(saved - 12); - } else { - const fs_el = document.getElementById('vv-es-fontsize'); - if (fs_el) fs_el.textContent = '12px'; - } + vvFontSizePx = 12; + vvFontSize(saved - 12); // always force inline fontSize+lineHeight — Unraid SPA CSS overrides line-height: 1.5 to normal vvWordWrap = localStorage.getItem('vv-editor-wordwrap') === '1'; vvApplyWordWrap(false); }