Skip to content

Commit 02bb853

Browse files
committed
This Chrome hack is no longer required.
1 parent 2c94a73 commit 02bb853

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/js/admin.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@ window.addEventListener( 'beforeunload', function(e) {
1111
let unsubmitted = document.getElementById( 'mc_unsubmitted' );
1212
let hold = ( typeof( unsubmitted ) != 'undefined' && unsubmitted != null ) ? true : false;
1313
if ( hold ) {
14-
// following two lines will cause the browser to ask the user if they
15-
// want to leave. The text of this dialog is controlled by the browser.
16-
e.preventDefault(); //per the standard
17-
e.returnValue = ''; //required for Chrome
14+
// Prompt to check whether user wants to leave.
15+
e.preventDefault();
1816
}
19-
//else: user is allowed to leave without a warning dialog
2017
});
2118

2219
let typeSelector = document.getElementById( 'typeupcoming' );

0 commit comments

Comments
 (0)