Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz committed Mar 13, 2023
1 parent 03080a6 commit 2e6b577
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ qx.Class.define("osparc.Application", {
// to provide our own message here
window.addEventListener("beforeunload", e => {
const downloadLinkTracker = osparc.DownloadLinkTracker.getInstance();
// The downloadLinkTracker uses an external link for downloading files.
// When it starts (click), triggers an unload event. This condition avoids the false positive
if (!downloadLinkTracker.isDownloading() && webSocket.isConnected()) {
// Cancel the event as stated by the standard.
e.preventDefault();
Expand Down

0 comments on commit 2e6b577

Please sign in to comment.