diff --git a/js/app.js b/js/app.js index 889df62..ed89123 100644 --- a/js/app.js +++ b/js/app.js @@ -5286,6 +5286,12 @@ async function deleteEntry(id) { danger: true, }); if (!ok) return; + } else if (soState && soState.id === id) { + // No delete confirmation configured: a misclick on ✕ would trash the + // entry AND drop the edits in the open editor with no warning at all. + // The discard gate stands in for it (it no-ops when nothing is dirty). + // Skipped when askBeforeDelete already asked — one modal is enough. + if (!(await requestCloseSlideOver())) return; } try { await api('/entries/' + id, { method: 'DELETE', headers: authHeaders() });