summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE-common/client/app/views/widget-onboarding
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-portal-FE-common/client/app/views/widget-onboarding')
-rw-r--r--ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js b/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js
index 661c63a3..0e7fd9fb 100644
--- a/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js
+++ b/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js
@@ -189,9 +189,16 @@
}
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);
});
};