Commit d5117808 authored by Francesc Guasch's avatar Francesc Guasch Committed by Francesc Guasch
Browse files

bug(view_machine): only copy if there is textarea

fixes issue #684
parent 83532b52
......@@ -295,6 +295,8 @@
$scope.copy_password= function() {
$scope.view_password=1;
var copyTextarea = document.querySelector('.js-copytextarea');
if (copyTextarea) {
copyTextarea.select();
try {
var successful = document.execCommand('copy');
......@@ -303,6 +305,8 @@
} catch (err) {
console.log('Oops, unable to copy');
}
}
};
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment