fix unnecessary popups about leaving the page

pull/255/head
azivner 2018-03-27 22:27:46 +07:00
parent 7464835058
commit 9bb188b519
1 changed files with 1 additions and 1 deletions

@ -234,7 +234,7 @@ $(document).ready(() => {
// this makes sure that when user e.g. reloads the page or navigates away from the page, the note's content is saved
// this sends the request asynchronously and doesn't wait for result
$(window).on('beforeunload', saveNoteIfChanged);
$(window).on('beforeunload', () => { saveNoteIfChanged(); }); // don't convert to short form, handler doesn't like returned promise
setInterval(saveNoteIfChanged, 5000);