Merge pull request #57 from calvincorreli/patch-1

Prevent FF < 41 scrolling to bottom of  page
This commit is contained in:
Zeno Rocha 2015-10-03 15:51:24 -07:00
commit b3fcd15a8e

View File

@ -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;