Fix editor line-height mismatch caused by Unraid SPA CSS override

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.
This commit is contained in:
Gmer4Lfe
2026-06-27 13:05:31 -04:00
parent ef7bc127b6
commit 0aa5851549
+2 -7
View File
@@ -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);
}