Skip to content

fix(compose): "Save Draft" publishes instead of drafting (#98)#99

Merged
vnykmshr merged 1 commit into
mainfrom
fix/v3.18.0-rc
May 19, 2026
Merged

fix(compose): "Save Draft" publishes instead of drafting (#98)#99
vnykmshr merged 1 commit into
mainfrom
fix/v3.18.0-rc

Conversation

@vnykmshr
Copy link
Copy Markdown
Collaborator

Root cause: compose.js disabled the submitter button before new FormData(form, submitter). Per HTML spec, disabled form fields are skipped during entry-list construction — including the submitter — so draft=on never reached the wire. Reorder: build FormData before disabling. Server: drafts redirected to canonical URL (404s for drafts); now redirect to /admin/drafts from both HandleSubmit and HandleEdit. Tests cover both paths. Pre-existing in v3.17.0; surfaced during the #97 readability pass. Closes #98.

Build FormData before disabling buttons — disabled fields are skipped
from entry-list construction, including the submitter. Server-side:
drafts redirect to /admin/drafts instead of the canonical URL (404s).
@vnykmshr
Copy link
Copy Markdown
Collaborator Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@vnykmshr vnykmshr merged commit 1a82b82 into main May 19, 2026
6 checks passed
@vnykmshr vnykmshr deleted the fix/v3.18.0-rc branch May 19, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

compose: "Save Draft" button publishes instead of saving as draft

1 participant