Skip to content

Commit b9353e4

Browse files
authored
Add returnValue to beforeunload event listener
1 parent 4e24294 commit b9353e4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/client/Main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ class Client {
156156
window.addEventListener("beforeunload", (e) => {
157157
if (this.gameStop && !this.gameStop()) {
158158
e.preventDefault();
159+
e.returnValue = '';
159160
return "";
160161
}
161162
console.log("Browser is closing");

0 commit comments

Comments
 (0)