From 6f7772c3d09e7145787c7efc9e4e7ca633d8fb37 Mon Sep 17 00:00:00 2001 From: jeongho <> Date: Tue, 7 Apr 2026 20:04:04 +0900 Subject: [PATCH] Fix pane widths not resetting when switching tabs across view modes When switching between tabs with different view modes (e.g., split and preview), the inline flex styles from split mode were not being cleared. This happened because restoreViewMode() sets currentViewMode to null before calling setViewMode(), causing the previousMode === 'split' check to always fail. Changed the condition to always reset pane widths when entering a non-split mode, regardless of the previous mode value. --- script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script.js b/script.js index cd33aa4..7f120b0 100644 --- a/script.js +++ b/script.js @@ -1552,8 +1552,8 @@ This is a fully client-side application. Your content never leaves your browser if (mode === 'split') { // Restore preserved pane widths when entering split mode applyPaneWidths(); - } else if (previousMode === 'split') { - // Reset pane widths when leaving split mode + } else { + // Reset inline pane widths when not in split mode resetPaneWidths(); }