Merge 13e4613f2e5c5fa7603efd35b05772629e32b727 into b5bc00f2e4afe0060c34b64f82a08e9bfcd27d97

This commit is contained in:
Gabriel Reitz Giannattasio 2015-09-29 17:17:29 +00:00
commit 502621959e

View File

@ -18,7 +18,7 @@ class ClipboardAction {
if (this.text && this.target) {
throw new Error('Multiple attributes declared, use either "target" or "text"');
}
else if (this.text) {
if (this.text) {
this.selectFake();
}
else if (this.target) {
@ -41,6 +41,8 @@ class ClipboardAction {
this.fakeElem = document.createElement('input');
this.fakeElem.style.position = 'absolute';
this.fakeElem.style.left = '-9999px';
this.fakeElem.style.width = 0;
this.fakeElem.style.height = 0;
this.fakeElem.setAttribute('readonly', '');
this.fakeElem.value = this.text;
this.selectedText = this.text;