Skip to content

Fix state desync in ComboMarkdownEditor#36625

Merged
silverwind merged 4 commits into
go-gitea:mainfrom
silverwind:taskedit
Feb 16, 2026
Merged

Fix state desync in ComboMarkdownEditor#36625
silverwind merged 4 commits into
go-gitea:mainfrom
silverwind:taskedit

Conversation

@silverwind
Copy link
Copy Markdown
Member

@silverwind silverwind commented Feb 14, 2026

Fixes #24253

When a tasklist checkbox is clicked, the tasklist code updates .raw-content with latest server data in the DOM after POSTing.

Then when "Edit" is clicked the ComboMarkdownEditor is shown with a stale value from the previous edit session.

The fix makes it always read from .raw-content, no server syncronization necessary because the value in .raw-content is the latest from the server.

Fixes go-gitea#24253

In scenario from the issue, after a tasklist checkbox is clicked, the tasklist
code updated `.raw-content` in the DOM after POSTing to the server.

Then when "Edit" is clicked the ComboMarkdownEditor is shown with a stale value.
Fix this by always reading from `.raw-content`, no server syncronization necessary
because the value in `.raw-content` is in sync with the server.
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 14, 2026
Comment thread web_src/js/features/repo-issue-edit.ts
Fix typo in comments regarding server-side content changes.
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 14, 2026
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 16, 2026
@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 16, 2026
@silverwind silverwind enabled auto-merge (squash) February 16, 2026 00:47
@silverwind silverwind merged commit 2896dac into go-gitea:main Feb 16, 2026
24 checks passed
@GiteaBot GiteaBot added this to the 1.26.0 milestone Feb 16, 2026
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 16, 2026
@wxiaoguang wxiaoguang deleted the taskedit branch February 16, 2026 09:24
@go-gitea go-gitea locked as resolved and limited conversation to collaborators May 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Markdown tasklist does not preserve checkbox state on "Edit"

5 participants