fix(slideover): opening the editor closes Settings (was hidden underneath)

Ctrl+Shift+A with Settings open created the entry panel BELOW the Settings
panel — invisible. openSlideOver now closes Settings first (root fix: covers
every editor-open path, not just the hotkey), placed after the discard guard
so cancelling keeps Settings. The inverse — opening Settings over the editor
— stays as-is by design (Esc: Settings first, editor second).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
r-zakarya
2026-07-13 04:57:20 +01:00
parent a911f2588f
commit 1751f0534f
+8
View File
@@ -3850,6 +3850,14 @@ async function openSlideOver(id, opts) {
} }
if (!isNew && !e) return; if (!isNew && !e) return;
// The editor must be visible when it opens: Settings sits ABOVE the
// slideover, so a hotkey (Ctrl+Shift+A) fired with Settings open left
// the new-entry panel hidden underneath. Close Settings — placed AFTER
// the discard guard so cancelling it keeps Settings untouched. The
// inverse (opening Settings over the editor) is deliberate and stays:
// Esc closes Settings first, then handles the editor.
if ($('#settingsPanel').classList.contains('is-open')) closeSettings();
state.selectedId = isNew ? null : id; state.selectedId = isNew ? null : id;
if (!isNew) touchEntry(id); if (!isNew) touchEntry(id);
// Templates: resolve a preset bundle of {kind, title, customFields, // Templates: resolve a preset bundle of {kind, title, customFields,