Add before unload to confirm change when editing a note ``` window.onbeforeunload = function() { return "Are you sure you want to navigate away?";//Keep the page from closing } ```
Add before unload to confirm change when editing a note