From d9c51cd57a94ea80b23bf128f84db4d8345621f8 Mon Sep 17 00:00:00 2001 From: Oleksandr Gozman Date: Thu, 11 Aug 2016 23:17:10 +0200 Subject: [PATCH] fix: should work on mozilla now --- .../resources/static/js/controllers/keyPairsController.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/resources/static/js/controllers/keyPairsController.js b/src/main/resources/static/js/controllers/keyPairsController.js index 818f25a..fb75dfc 100644 --- a/src/main/resources/static/js/controllers/keyPairsController.js +++ b/src/main/resources/static/js/controllers/keyPairsController.js @@ -72,7 +72,10 @@ app.controller('keyPairsCtrl', function ($scope, serviceAPI, $routeParams, http, var key = document.createElement("a"); key.download = $scope.createKeyName + '.pem'; key.href = 'data:application/x-pem-file,' + encodeURIComponent(response); - key.click(); + document.body.appendChild(key); + key.click() + document.body.removeChild(key); + delete key; //document.location = 'title: key.pem, data:application/x-pem-file,' + // encodeURIComponent(response); //location.reload();