mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 11:56:01 +01:00 
			
		
		
		
	fix unnecessary popups about leaving the page
This commit is contained in:
		@@ -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);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user