Prevent losing other changes to a ticket when edit a comment
|Reported by:||skstrobel||Owned by:||SergeiLuchko|
Several times lately I have been in the middle of writing a long comment for a ticket when I noticed a typo in an earlier comment. Thanks to the TicketChangePlugin, it is simple to fix the typo, but I then find that the long comment I was writing is gone forever (going back in the browser doesn't restore it).
I can think of three ways to solve this problem:
- Open the ticket change editor in a new browser tab or window.
- Notify you if you have unsaved edits and give you a chance to save them before continuing.
- Remember your edits and restore them after editing the ticket comment.
Option 2 works well in something like http://www.tiddlywiki.com/; it warns you before allowing you to leave with unsaved edits. In that case, it can determine when you have edited a tiddler (you have to press an "Edit" button to start and "Done" when finished). It may be difficult to implement this option in Trac unless there is a good way to determine that you have started typing a new comment or made other unsaved changes to the ticket.
Option 3 might be the most convenient for the user, as TicketChangePlugin would continue to work as it does now (normally opening the change editor in the same tab) but would not result in lost changes.