From 5f6998a34899fd2da1f864ec62ac444afeedcf52 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sat, 6 Apr 2019 22:23:09 +0800 Subject: [PATCH] fix cannot copy exported settings in some browser --- package-lock.json | 5 ++--- package.json | 2 +- src/scripts/controllers/settings-ariang.js | 4 +++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 88346fc..5098089 100644 --- a/package-lock.json +++ b/package-lock.json @@ -217,9 +217,8 @@ "integrity": "sha1-tPGzM+x87THCB9tePXdmU3XRjqA=" }, "angular-clipboard": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/angular-clipboard/-/angular-clipboard-1.6.2.tgz", - "integrity": "sha512-T5kK6X6fFigLPd2szxW8ETEOLNW9z/9RqdlXtLAY7nakrI62BH8FGOxIes36tvAP/9numwokEWKVLy0WpNkB7w==" + "version": "git://github.com/mayswind/angular-clipboard.git#597a03b73a13754926bd2406979e5de65eb98102", + "from": "git://github.com/mayswind/angular-clipboard.git#597a03b73a13754926bd2406979e5de65eb98102" }, "angular-cookies": { "version": "1.6.10", diff --git a/package.json b/package.json index a835296..9fd1d37 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "angular-promise-buttons": "^0.1.23", "angular-sweetalert": "^1.1.2", "angular-utf8-base64": "^0.0.5", - "angular-clipboard": "^1.6.2", + "angular-clipboard": "git://github.com/mayswind/angular-clipboard.git#597a03b73a13754926bd2406979e5de65eb98102", "angular-input-dropdown": "git://github.com/mayswind/angular-input-dropdown.git#68670e39816698b3eb98c0e740a0efe77d5fbdd1", "angularjs-dragula": "^2.0.0" }, diff --git a/src/scripts/controllers/settings-ariang.js b/src/scripts/controllers/settings-ariang.js index c73edea..cba0e3e 100644 --- a/src/scripts/controllers/settings-ariang.js +++ b/src/scripts/controllers/settings-ariang.js @@ -256,7 +256,9 @@ }); $scope.copyExportSettings = function () { - clipboard.copyText($scope.context.exportSettings); + clipboard.copyText($scope.context.exportSettings, { + container: angular.element('#export-settings-modal')[0] + }); $scope.context.exportSettingsCopied = true; };