mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
Merge pull request #38 from max-cross/master
Changed "fakeElem" element type.
This commit is contained in:
commit
0abb217253
4
dist/clipboard.js
vendored
4
dist/clipboard.js
vendored
@ -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', '');
|
||||
|
@ -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', '');
|
||||
|
Loading…
x
Reference in New Issue
Block a user