Use $(window).on() instead of window.addEventListener. Because ¯\_(ツ)_/¯

This commit is contained in:
George Stephanis 2015-08-10 16:03:13 -04:00
parent dc649e2964
commit 0fb85f4656
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@
this.qty_pages = Math.ceil( this.model.get( 'rates' ).length / this.per_page );
this.listenTo( this.model, 'change', this.setUnloadConfirmation );
this.listenTo( this.model, 'saved', this.clearUnloadConfirmation );
window.addEventListener( 'beforeunload', this.unloadConfirmation );
$(window).on( 'beforeunload', this.unloadConfirmation );
},
setUnloadConfirmation : function() {
this.needsUnloadConfirm = true;