fix: copy to clipboard strips off newlines

input element isn't suitable for this hack, switch to textarea for
supporting newlines in text to be copied.
This commit is contained in:
Ankush Menat 2021-12-08 23:01:59 +05:30
parent 5b6012d0d3
commit ecdb893286

View file

@ -957,7 +957,7 @@ Object.assign(frappe.utils, {
return decoded;
},
copy_to_clipboard(string) {
let input = $("<input>");
let input = $("<textarea>");
$("body").append(input);
input.val(string).select();