Skip to content
This repository has been archived by the owner on Apr 28, 2023. It is now read-only.

Commit

Permalink
fix: remove whitespace when copying addresses and invoices (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 authored Aug 27, 2019
1 parent 5eb248b commit ea8280e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,11 @@ export const getSmallestDenomination = symbol => {
*/
export const copyToClipBoard = () => {
const range = document.createRange();
range.selectNode(document.getElementById('copy'));
range.selectNodeContents(document.getElementById('copy'));

window.getSelection().removeAllRanges();
window.getSelection().addRange(range);

document.execCommand('copy');
};

Expand Down

0 comments on commit ea8280e

Please sign in to comment.