From e4f3fb226c4cd1cb8fc6473a574dfd3d9168f2a8 Mon Sep 17 00:00:00 2001 From: Maxim Lebedinets Date: Wed, 30 Sep 2015 20:52:48 +0300 Subject: [PATCH] Modified comments and changed element type for "ClipboardAction" class; --- dist/clipboard.js | 2 +- src/clipboard-action.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/clipboard.js b/dist/clipboard.js index 657325c..58be0a7 100644 --- a/dist/clipboard.js +++ b/dist/clipboard.js @@ -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. */ diff --git a/src/clipboard-action.js b/src/clipboard-action.js index 8346b81..93eee91 100644 --- a/src/clipboard-action.js +++ b/src/clipboard-action.js @@ -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', '');