Skip to content

Commit

Permalink
removed the returnValue property from the saveInterface class as it i…
Browse files Browse the repository at this point in the history
…s deprecated and the preventDefault property is sufficient (#3379)
  • Loading branch information
viditagrawal56 authored Nov 24, 2023
1 parent 8565fc0 commit 94b2fda
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions js/SaveInterface.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class SaveInterface {

this.timeLastSaved = -100;
const $j = jQuery.noConflict();
$j(window).bind("beforeunload", (event) => {
$j(window).on("beforeunload", (event) => {
let saveButton = "#saveButtonAdvanced";
if (this.activity.beginnerMode) {
saveButton = "#saveButton";
Expand All @@ -86,7 +86,6 @@ class SaveInterface {
this.PlanetInterface !== undefined
) {
event.preventDefault();
event.returnValue = "";
// Will trigger when exit/reload cancelled.
$j(saveButton).trigger("mouseenter");
return "";
Expand Down

0 comments on commit 94b2fda

Please sign in to comment.