diff options
| author | ileyd <ileyd@icloud.com> | 2016-07-04 08:09:42 +0200 |
|---|---|---|
| committer | ileyd <ileyd@icloud.com> | 2016-07-04 08:09:42 +0200 |
| commit | f7f512379a3fc0b307125c0459f8837d59f11ad0 (patch) | |
| tree | 5e8bf32867cdc6f6a707b272725201ae4fb356f6 /static/js/app.js | |
| parent | a257b13c4c3c226c3ea37f955cad8426e99bd9d1 (diff) | |
Cleared selection first upon copy button click to fix #45
Diffstat (limited to 'static/js/app.js')
| -rw-r--r-- | static/js/app.js | 1 |
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); |
