# Catching unsaved content in entry editors

**URL:** <https://discourse.getcockpit.com/t/catching-unsaved-content-in-entry-editors/1063>\
**Category:** Support\
**Created:** [October 23, 2019, 8:36am UTC](https://discourse.getcockpit.com/t/catching-unsaved-content-in-entry-editors/1063 "2019-10-23T08:36:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tao](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@tao](https://discourse.getcockpit.com/u/tao)\
**Post date:** [October 23, 2019, 8:36am UTC](https://discourse.getcockpit.com/t/catching-unsaved-content-in-entry-editors/1063/1 "2019-10-23T08:36:38Z")

</div>

Hi, is there a way to catch when the user is navigating away from editing a singleton/collection entry with unsaved changes?  
I would like to show my users a little confirmation box before accidentally discarding changes.

---

<div class="post-metadata">

**Author:** ![pauloamgomes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/pauloamgomes/32/48_2.png) [@pauloamgomes](https://discourse.getcockpit.com/u/pauloamgomes)\
**Post date:** [October 23, 2019, 9:20am UTC](https://discourse.getcockpit.com/t/catching-unsaved-content-in-entry-editors/1063/2 "2019-10-23T09:20:17Z")

</div>

That is not possible OOB, but maybe with some JS where you need to capture the click events, in such case if you are concerned with losing changes you can check the AutoSave add-on as the purpose is exactly to avoid that - [https://github.com/pauloamgomes/CockpitCMS-Autosave](https://github.com/pauloamgomes/CockpitCMS-Autosave)

---

<div class="post-metadata">

**Author:** ![tao](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@tao](https://discourse.getcockpit.com/u/tao)\
**Post date:** [October 23, 2019, 12:27pm UTC](https://discourse.getcockpit.com/t/catching-unsaved-content-in-entry-editors/1063/3 "2019-10-23T12:27:48Z")

</div>

Oh! That’s perfect. Thank you. How did I not find this addon.
