redimp / otterwiki

A minimalistic wiki powered by python, markdown and git.
https://otterwiki.com
MIT License
202 stars 22 forks source link

Warn the user when navigating away from unsaved changes #64

Open redimp opened 7 months ago

redimp commented 7 months ago

The wiki should display a warning, in case the user has edited the page, is either in the Editor or on the Preview Page and would discard the changes when naviating away from there.

Reported in #60.

bverkron commented 7 months ago

Was just thinking... rather than just a warning alone I wonder if it would be possible to bring up the save / commit dialog with the warning inside that dialog so that the user can either cancel and remain on the page or save / commit and continue navigating away from the page. Might be a smooth way to do it so that they don't have to dismiss the warning, manually trigger the save operation, and then trigger the navigation again.