Skip to content

Commit

Permalink
fix copy bug where copy would only contain previously selected text
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Jan 3, 2018
1 parent c750d50 commit 37cec28
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core_plugins/kibana/public/home/copy_to_clipboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export function copyToClipboard(text) {
try {
document.body.appendChild(elementToBeCopied);
range.selectNode(elementToBeCopied);
selection.empty();
selection.addRange(range);

if (!document.execCommand('copy')) {
Expand Down

0 comments on commit 37cec28

Please sign in to comment.