Merge pull request #38 from max-cross/master

Changed "fakeElem" element type.
This commit is contained in:
Zeno Rocha 2015-09-30 15:57:52 -07:00
commit 0abb217253
2 changed files with 63 additions and 63 deletions

4
dist/clipboard.js vendored
View File

@ -265,7 +265,7 @@ var ClipboardAction = (function () {
};
/**
* Creates a fake input element, sets its value from `text` property,
* Creates a fake textarea element, sets its value from `text` property,
* and makes a selection on it.
*/
@ -278,7 +278,7 @@ var ClipboardAction = (function () {
return _this.removeFake();
});
this.fakeElem = document.createElement('input');
this.fakeElem = document.createElement('textarea');
this.fakeElem.style.position = 'absolute';
this.fakeElem.style.left = '-9999px';
this.fakeElem.setAttribute('readonly', '');

View File

@ -45,7 +45,7 @@ class ClipboardAction {
}
/**
* Creates a fake input element, sets its value from `text` property,
* Creates a fake textarea element, sets its value from `text` property,
* and makes a selection on it.
*/
selectFake() {
@ -53,7 +53,7 @@ class ClipboardAction {
this.fakeHandler = document.body.addEventListener('click', () => this.removeFake());
this.fakeElem = document.createElement('input');
this.fakeElem = document.createElement('textarea');
this.fakeElem.style.position = 'absolute';
this.fakeElem.style.left = '-9999px';
this.fakeElem.setAttribute('readonly', '');