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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user