diff --git a/src/lib/components/DetailsPanel.svelte b/src/lib/components/DetailsPanel.svelte index 0ddb156..354b6e1 100644 --- a/src/lib/components/DetailsPanel.svelte +++ b/src/lib/components/DetailsPanel.svelte @@ -116,7 +116,13 @@ let placed = $derived(narrow || pos !== null); + // Escape/X/scrim all close the panel the same way: commit whatever's still + // only in the drafts (typing in the notes editor never patches the store + // until blur — see MarkdownNotes) before `ui.closeDetails()` clears + // `detailsId` out from under `task`, or the edit is lost rather than saved. function close() { + commitTitle(); + commitNotes(); ui.closeDetails(); lastId = null; }