Some actions (Stop Timer/Assign/Label/Milestone ... ) on issue page will make page reload and lose unsaved content, autosave draft or ajax #8124

Open
opened 2025-11-02 07:54:31 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @aschrijver on GitHub (Nov 18, 2021).

Feature Description

This is a feature request to avoid users (like myself) from stupidity.

I just started using the Timer in the Issue Tracker, and - not being used to it - pressed "Stop Timer" a number of times, while I was still editing the issue text. Forgot to press "Save". This caused all my work to be lost (happened just now after typing a very long text). Also pressing the browser "Back" button (Firefox) did not lead back to edit-mode view, but to the Project Board from which I opened the issue.

The Gitea UI could prevent this from happening by either showing a dialog "You are currently editing. Continue? Yes/No", or committing the changes by handling the "Save" action automatically with "Stop Timer" button press.

Screenshots

No response

Originally created by @aschrijver on GitHub (Nov 18, 2021). ### Feature Description This is a feature request to avoid users (like myself) from stupidity. I just started using the Timer in the Issue Tracker, and - not being used to it - pressed "Stop Timer" a number of times, while I was still editing the issue text. Forgot to press "Save". This caused all my work to be lost (happened just now after typing a very long text). Also pressing the browser "Back" button (Firefox) did not lead back to edit-mode view, but to the Project Board from which I opened the issue. The Gitea UI could prevent this from happening by either showing a dialog "You are currently editing. Continue? Yes/No", or committing the changes by handling the "Save" action automatically with "Stop Timer" button press. ### Screenshots _No response_
GiteaMirror added the topic/ui label 2025-11-02 07:54:31 -06:00
Author
Owner

@aschrijver commented on GitHub (Nov 20, 2021):

Note that there are more ways to lose text, that Gitea may or may not be able to protect the user against. Like when you press 'Edit' and update a text, then - without saving - suspend the computer, restart it later and press 'Save'. All updated text will be lost without warning.

@aschrijver commented on GitHub (Nov 20, 2021): Note that there are more ways to lose text, that Gitea may or may not be able to protect the user against. Like when you press 'Edit' and update a text, then - without saving - suspend the computer, restart it later and press 'Save'. All updated text will be lost without warning.
Author
Owner

@lunny commented on GitHub (Nov 22, 2021):

Hm, should we store it in Local Storage of web browser?

@lunny commented on GitHub (Nov 22, 2021): Hm, should we store it in Local Storage of web browser?
Author
Owner

@wxiaoguang commented on GitHub (Jun 24, 2022):

press 'Edit' and update a text, then - without saving - suspend the computer, restart it later and press 'Save'. All updated text will be lost without warning.

This is another problem and it should have been fixed, it's related CSRF token generation, and sometimes caused by misconfigured session/cookie.


Autosave (draft) could be related to


To make the web UI friendly, some possible solutions:

  1. use AJAX as much as possible (then no page reload, no lost)
  2. use Autosave(Draft)
  3. use a warning dialog (not that friendly, I would prefer 1 or 2)
@wxiaoguang commented on GitHub (Jun 24, 2022): > press 'Edit' and update a text, then - without saving - suspend the computer, restart it later and press 'Save'. All updated text will be lost without warning. This is another problem and it should have been fixed, it's related CSRF token generation, and sometimes caused by misconfigured session/cookie. ---- Autosave (draft) could be related to * #1315 ---- ## To make the web UI friendly, some possible solutions: 1. use AJAX as much as possible (then no page reload, no lost) 2. use Autosave(Draft) 3. use a warning dialog (not that friendly, I would prefer 1 or 2)
Author
Owner

@lunny commented on GitHub (Apr 4, 2023):

Should be fixed by #23895

@lunny commented on GitHub (Apr 4, 2023): Should be fixed by #23895
Author
Owner

@wxiaoguang commented on GitHub (Apr 4, 2023):

Nope, wait for other steps in:

@wxiaoguang commented on GitHub (Apr 4, 2023): Nope, wait for other steps in: * #23290
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8124