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

Comment text lost when changing issue label #22603

Closed
brechtvl opened this issue Jan 25, 2023 · 1 comment · Fixed by #22604
Closed

Comment text lost when changing issue label #22603

brechtvl opened this issue Jan 25, 2023 · 1 comment · Fixed by #22604
Labels

Comments

@brechtvl
Copy link
Contributor

Description

To reproduce:

  • Type text in comment field on an existing issue
  • Add a label to the issue
  • Page reloads and comment field is cleared

If you've spent some time typing out a detailed comment, this is not ideal.

It was caused by #20432. Before that the comment was preserved.

Tested on Firefox 109, Ubuntu Linux 20.04.

Gitea Version

e8ac6a9 (main)

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Built Gitea myself, and confirmed on try.gitea.io.

Database

None

brechtvl added a commit to brechtvl/gitea that referenced this issue Jan 26, 2023
The no-store cache control added in go-gitea#20432 is causing form input to be cleared
unnecessarily on page reload. Instead use max-age=0,private,must-revalidate
which avoid this.

This was particularly a problem when typing a long comment for an issue and
then for example changing the label. The page would be reload and lose the
unsubmitted comment.

Fixes go-gitea#22603
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jan 26, 2023

It's actually caused by this issue #17705 (more discussions in #22604)

jolheiser pushed a commit that referenced this issue Feb 1, 2023
…2604)

The `no-store` cache control added in #20432 is causing form input to be
cleared unnecessarily on page reload. Instead use
`max-age=0,private,must-revalidate` which avoids this.

This was particularly a problem when typing a long comment for an issue
and then for example changing the label. The page would be reloaded and
lose the unsubmitted comment.

Fixes #22603
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants