diff --git a/cookbook/templates/include/recipe_open_modal.html b/cookbook/templates/include/recipe_open_modal.html index c24697436..d01ebe882 100644 --- a/cookbook/templates/include/recipe_open_modal.html +++ b/cookbook/templates/include/recipe_open_modal.html @@ -55,10 +55,14 @@ var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function () { if (this.readyState === 4 && this.status === 200) { - window.open(this.responseText); - $('#modal_recipe').modal('hide'); - //link.attr("href", this.responseText); - //link.show(); + if (navigator.userAgent.toLowerCase().indexOf('safari/') > -1){ + link.attr("href", this.responseText); + link.show(); + }else{ + window.open(this.responseText); + $('#modal_recipe').modal('hide'); + } + $('#div_loader').hide(); }