Adding warning when Cancel'ing a Preview

Issue #8736 duplicate
Johan Rosenkilde
created an issue

When Preview'ing an edit in the wiki or the issue tracker, the Cancel button just beside "Create issue" will throw all ones work away. This is not natural when in the Editor, since one intuitively expects this behaviour from the Cancel button (what else should it do?), but in the Preview'er, one can easily take Cancel to mean "Cancel this Preview and return to editing". Especially since the button is right next to Create issue.

This mistake has happened to myself and now also one of my colleagues.

Admittedly, this is a newbie error, but wouldn't it be good usability to present a warning to the user in this case? After all, even expert users don't write edits, previews and then directly trashes this edit all the time, so the extra confirmation shouldn't annoy anyone.

A more intrusive possible solution is to remove the Cancel button entirely when in Preview, and add another Edit button instead of it. If you really wanted to throw your work away based on its preview, you should be forced to go back to Edit for this.