Closed Ryan-pelo closed 1 year ago
There is already a warning via jquery.are-you-sure
, but I'm not sure whether it will catch all changes, I think it only looks at stuff inside <form>
.
Also, we really need to eliminate all cases of window.reload
in JS. Might require new APIs to be added thought.
Some details & background:
Before SimpleMDE/EasyMDE, there is a global $.areYourSure
confirm (using onbeforeunload) for comment textarea. Everything was just "fine".
However, after introducing SimpleMDE/EasyMDE, $.areYourSure
doesn't work well with SimpleMDE/EasyMDE editor, so the situation became what you see now.
Another reason to add to the list of like 30+ other issues on why we should remove EasyMDE and replace it with a textarea.
I could also agree to remove the EasyMDE if there is no strong objection from user side.
Yes I think the majority of users is for it, see https://github.com/go-gitea/gitea/issues/10729.
Then let's do it?
Yes, I think the approach in https://github.com/go-gitea/gitea/pull/15394 with the github toolbar is still ideal. If you have the capacity to do it, please go ahead, I'm happy to review.
Should be fixed by #23895
Works now with https://github.com/go-gitea/gitea/pull/23876
Feature Description
A few times I have been typing a long comment or post and accidently clicked a link or refreshed the page. Then all my work is gone and non-recoverable. I would appreciate having a "Leave Site?" dialogue box if I have unsaved content in a text box.
Screenshots