Commit d6820c4b authored by Eduardo Sanz García's avatar Eduardo Sanz García

Reverted: Preserve line breaks on copy command

parent 607655b9
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* @param {string} text * @param {string} text
*/ */
export function copyText(text) { export function copyText(text) {
const temp = document.createElement('textarea'); // use textarea instead of input to preserve line breaks const temp = document.createElement('input');
temp.value = text; temp.value = text;
temp.setAttribute('data-testid', 'copy-text'); temp.setAttribute('data-testid', 'copy-text');
// Recipe from https://stackoverflow.com/a/34046084/14463679 // Recipe from https://stackoverflow.com/a/34046084/14463679
......
Markdown is supported
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