diff --git a/src/clipboard-action.js b/src/clipboard-action.js index 93eee91..e6dd4ef 100644 --- a/src/clipboard-action.js +++ b/src/clipboard-action.js @@ -56,6 +56,7 @@ class ClipboardAction { this.fakeElem = document.createElement('textarea'); this.fakeElem.style.position = 'absolute'; this.fakeElem.style.left = '-9999px'; + this.fakeElem.style.top = document.body.scrollTop + 'px'; this.fakeElem.setAttribute('readonly', ''); this.fakeElem.value = this.text; this.selectedText = this.text;