Prevent losing draft comments on navigation or if a window is closed #68448
Replies: 13 comments 3 replies
-
|
I think this problem happens when I type in the comment box too. Sometimes to write pseudocode, I need to open other tabs and accidentally close this one when I navigate back/view changed files; and GitHub just dumps all my efforts. I strongly agree that either prompting "are you sure to leave and discard unsaved changes" or saving in a cache works well to resolve this issue. |
Beta Was this translation helpful? Give feedback.
-
|
Just lost an hour writing a comment, clicked a hyperlink in said comment to ensure it went to the right place and it opened in the same window rather than a new window. Lost everything. Really frustrating |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
I HATE doing PRs on GitHub for this very reason. |
Beta Was this translation helpful? Give feedback.
-
|
This would be immensely helpful. I had typed up a long draft for github issue but my laptop battery reached 0% and it shut down ( I somehow missed it in midst of doing multi-tasking multiple things), when I started it back and restarted the browser, the issues page loaded but empty content. |
Beta Was this translation helpful? Give feedback.
-
|
Happened to me just now. I was writing an invested and detailed comment, and paused to check some email. By mistake closed the tab and now seem to have lost the comment... As mentioned in comments above me, a browser alert would be very helpful. |
Beta Was this translation helpful? Give feedback.
-
|
Oh, this just happen to me - not due to I mis clicked something, but rather stupid company policy forcibly restarted my Chrome just in the middle of typing. |
Beta Was this translation helpful? Give feedback.
-
|
Happened to me when accidentally closed the window |
Beta Was this translation helpful? Give feedback.
-
|
same thing happened to me |
Beta Was this translation helpful? Give feedback.
-
|
I think similar limitations exist for any text input in Github which make it hard for me to keep my entire workflow in the Github UI. Instead, I tend to draft out more elaborate texts in a local editor, iterate over them, and paste them into Github's UI when they're ready for submission. If I forget to start locally, or if my text grows longer than anticipated, there's always the risk of losing my progress. And this happens at least once a month for various reasons (way too often). This also means that there's not an easy way to work on drafts from multiple devices before submission. While draft PRs exist, I'm not aware of draft issues or draft comments. Draft PRs are also immediately made public. I would find such a feature very useful! Partially because I haven't found a good workaround for this yet. My cross-device text editor of choice doesn't support Markdown which makes it very annoying to use for this use case. I hate to say it, but Confluence makes this a lot easier where I can start creating a synced draft page from any device, and then publish it from another... |
Beta Was this translation helpful? Give feedback.
-
|
Just wanna say, I hate everything, since I lost an hour too just by misclicking once right after finishing.... |
Beta Was this translation helpful? Give feedback.
-
|
It just happened to me. I was typing a very long detailed comment and had been typing it for about 2 hours doing research to make sure I got the details right at the same time and I lost absolutely everything. I would have assumed that website like github would have been smart enough to keep a copy of my in-progress comments in a cookie that is saved every few minutes. But it appears it isn't the case. I just lost everything and I am not ready to start typing my issue report all over again, I am too infuriated. |
Beta Was this translation helpful? Give feedback.
-
|
Hi all. Chiming in because I think this problem has actually gotten worse in recent weeks. I don't remember this happening earlier, but now simply closing the "Submit Review" panel by (often accidentally) clicking Escape, or clicking elsewhere on the page, completely blanks out the input. This is very user-unfriendly and unintuitive. Could you at least preserve the content by keeping the element in the DOM when it is hidden? |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Product Feedback
Body
When adding a comment in the "Files changed" area of a PR, anything entered is lost if the window is accidentally closed or another page is visited (even switching between Conversation/Commits/Checks/Files changed tabs). There is no warning alert on window close, and the draft unsubmitted comment is not saved anywhere (even browser local storage) and/or is not easily discovered. This can lead to a frustrating loss of work and time.
I've possibly seen some evidence of unsubmitted comment text on single-line comments being saved, but I don't know if it's GitHub or Chrome (or a Chrome extension) doing that. If it is GitHub, the draft comment is completely undiscoverable and seems to not work at all for comments being added to multiple lines of code in the PR.
Possible enhancements are:
Beta Was this translation helpful? Give feedback.
All reactions