# HG changeset patch # User Sebastien Jodogne # Date 1606814497 -3600 # Node ID 65c03d33c345de1d08ae7c59099a14d7385a2680 # Parent 391c798e4daeac56b486149e49a132d9a6575958 use "window.location" instead of "window.open()" to download archives diff -r 391c798e4dae -r 65c03d33c345 Applications/StoneWebViewer/WebApplication/app.js --- a/Applications/StoneWebViewer/WebApplication/app.js Tue Dec 01 10:08:26 2020 +0100 +++ b/Applications/StoneWebViewer/WebApplication/app.js Tue Dec 01 10:21:37 2020 +0100 @@ -937,7 +937,16 @@ var state = response.data['State']; if (state == 'Success') { that.creatingArchive = false; - window.open(that.globalConfiguration.OrthancApiRoot + '/jobs/' + that.archiveJob + '/archive'); + var uri = that.globalConfiguration.OrthancApiRoot + '/jobs/' + that.archiveJob + '/archive'; + + /** + * The use of "window.open()" below might be blocked + * (depending on the browser criteria to block popup). + * As a consequence, we prefer to set "window.location". + * https://www.nngroup.com/articles/the-top-ten-web-design-mistakes-of-1999/ + **/ + // window.open(uri, '_blank'); + window.location = uri; } else if (state == 'Running') { setTimeout(that.CheckIsDownloadComplete, 1000);