Skip to content

fix: preserve comment field across HTMX suggestion refreshes#833

Merged
fricklerhandwerk merged 1 commit intoNixOS:mainfrom
Bbn08:fix/795-preserve-comment-on-suggestion-edit
Feb 28, 2026
Merged

fix: preserve comment field across HTMX suggestion refreshes#833
fricklerhandwerk merged 1 commit intoNixOS:mainfrom
Bbn08:fix/795-preserve-comment-on-suggestion-edit

Conversation

@Bbn08
Copy link
Contributor

@Bbn08 Bbn08 commented Feb 28, 2026

Closes #795

Any edit operation (ignore/restore package, maintainer changes) triggers an HTMX swap of the entire suggestion component, which reset the comment textarea to its saved DB value, dropping any unsaved text.

Fix: add hx-preserve and a unique id to the comment textarea. HTMX will retain the current DOM value of the textarea across swaps instead of replacing it with the server-rendered value.

Copy link
Collaborator

@fricklerhandwerk fricklerhandwerk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much!

@fricklerhandwerk fricklerhandwerk merged commit 3e2c287 into NixOS:main Feb 28, 2026
3 checks passed
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.

Don't drop comment field when editing suggestion

2 participants