Skip to content

Commit

Permalink
Disabled beforeunload event when not in IDE mode (e.g. auto, play)
Browse files Browse the repository at this point in the history
  • Loading branch information
boxgaming committed Jun 14, 2023
1 parent af8b0bd commit 18c0c92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,5 @@
<script language="javascript" src="gx/gx.js"></script>
<script language="javascript" src="qb.js?v=0.7.3"></script>
<script language="javascript" src="qb2js.js"></script>
<script language="javascript" src="qbjs-ide.js?v=0.7.3"></script>
<script language="javascript" src="qbjs-ide.js?v=0.7.3.1"></script>
</html>
2 changes: 1 addition & 1 deletion qbjs-ide.js
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ dropArea.addEventListener("dragover", fileDragOver, false);
dropArea.addEventListener("dragenter", fileDragEnter, false);
dropArea.addEventListener("dragleave", fileDragLeave, false);

if (!inIframe()) {
if (!inIframe() && appMode == "ide") {
addEventListener("beforeunload", function(e) {
e.preventDefault();
return e.returnValue = "stop";
Expand Down

0 comments on commit 18c0c92

Please sign in to comment.