[PORTAL-20,PORTAL-23,PORTAL-32] Repair defects
[portal.git] / ecomp-portal-FE-common / client / app / views / widget-onboarding / widget-onboarding.controller.js
index 661c63a..0e7fd9f 100644 (file)
                                }
                                var a = document.createElement('a');
                                var blob = new Blob([data], {type: 'application/octet-stream'});
-                               a.href = URL.createObjectURL(blob);
+                               var url = window.URL.createObjectURL(blob);
+                               a.href = url;
                                a.download = filename;
+                               document.body.appendChild(a);
                                a.click();
+                               
+                               setTimeout(function(){
+                               document.body.removeChild(a);
+                               window.URL.revokeObjectURL(url);  
+                           }, 100);  
                        });
             };