summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorileyd <ileyd@icloud.com>2016-07-04 08:09:42 +0200
committerileyd <ileyd@icloud.com>2016-07-04 08:09:42 +0200
commitf7f512379a3fc0b307125c0459f8837d59f11ad0 (patch)
tree5e8bf32867cdc6f6a707b272725201ae4fb356f6 /static
parenta257b13c4c3c226c3ea37f955cad8426e99bd9d1 (diff)
Cleared selection first upon copy button click to fix #45
Diffstat (limited to 'static')
-rw-r--r--static/js/app.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/static/js/app.js b/static/js/app.js
index eaac857..0215599 100644
--- a/static/js/app.js
+++ b/static/js/app.js
@@ -97,6 +97,7 @@ document.addEventListener('DOMContentLoaded', function () {
link.appendChild(element);
var range = document.createRange();
range.selectNode(element);
+ window.getSelection().removeAllRanges();
window.getSelection().addRange(range);
document.execCommand("copy");
link.removeChild(element);