Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown tasklist does not preserve checkbox state on "Edit" #24253

Open
silverwind opened this issue Apr 21, 2023 · 5 comments
Open

Markdown tasklist does not preserve checkbox state on "Edit" #24253

silverwind opened this issue Apr 21, 2023 · 5 comments

Comments

@silverwind
Copy link
Member

silverwind commented Apr 21, 2023

Description

Steps to reproduce:

  1. Create issue comment with - [ ].
  2. Click Edit
  3. Click Cancel
  4. Click the checkbox
  5. Click Edit

Checkbox is incorrectly unchecked in markdown source:

image

Screenshot 2023-04-21 at 12 42 53

Gitea Version

main

Can you reproduce the bug on the Gitea demo site?

Yes

@wxiaoguang
Copy link
Contributor

IIRC the "edit" just shows the last edited content.

So if you edit in window A, cancel, edit in window B, save, then edit in window A, you still see the old content ....

They are similar problems.

@silverwind
Copy link
Member Author

silverwind commented Apr 21, 2023

This is happening in the same window. Multi-Window is of course more complicated and I wouldn't expect state syncs there.

@wxiaoguang
Copy link
Contributor

But they are the same problem.

When click "edit", the content should be fetched from server, instead of using local stale content.

@silverwind
Copy link
Member Author

Right, that sounds like the root cause.

@silverwind
Copy link
Member Author

BTW tasklist we should eventually migrate to https://github.com/github/task-lists-element, but this issue is in any case not related to tasklist specifically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants