{"action":"opened","issue":{"url":"https://api.github.com/repos/zenorocha/clipboard.js/issues/41","labels_url":"https://api.github.com/repos/zenorocha/clipboard.js/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/zenorocha/clipboard.js/issues/41/comments","events_url":"https://api.github.com/repos/zenorocha/clipboard.js/issues/41/events","html_url":"https://github.com/zenorocha/clipboard.js/issues/41","id":109154699,"number":41,"title":"Text not copied to clipboard in disabled textarea","user":{"login":"johnymontana","id":1222454,"avatar_url":"https://avatars.githubusercontent.com/u/1222454?v=3","gravatar_id":"","url":"https://api.github.com/users/johnymontana","html_url":"https://github.com/johnymontana","followers_url":"https://api.github.com/users/johnymontana/followers","following_url":"https://api.github.com/users/johnymontana/following{/other_user}","gists_url":"https://api.github.com/users/johnymontana/gists{/gist_id}","starred_url":"https://api.github.com/users/johnymontana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnymontana/subscriptions","organizations_url":"https://api.github.com/users/johnymontana/orgs","repos_url":"https://api.github.com/users/johnymontana/repos","events_url":"https://api.github.com/users/johnymontana/events{/privacy}","received_events_url":"https://api.github.com/users/johnymontana/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-30T18:45:30Z","updated_at":"2015-09-30T18:45:30Z","closed_at":null,"body":"I am using clipboard.js to copy text from a disabled textarea (the text is programmatically generated and I don't want the user to edit it before copying):\r\n    \r\n    <button class=\"copyBtn\" data-clipboard-target=\"#myTextArea\">Copy</button>\r\n    <textarea id=\"myTextArea\" rows=\"10\" disabled>My text here</textarea>\r\n\r\nWith the `disabled` property the text is not copied to the clipboard, despite the clipboard success event indicating that it is:\r\n\r\n~~~\r\nvar clipboard = new Clipboard('.copyBtn');\r\n\r\n        clipboard.on('success', function(e) {\r\n            console.info('Action:', e.action);\r\n            console.info('Text:', e.text);\r\n            console.info('Trigger:', e.trigger);\r\n\r\n            e.clearSelection();\r\n        });\r\n\r\n        clipboard.on('error', function(e) {\r\n            console.error('Action:', e.action);\r\n            console.error('Trigger:', e.trigger);\r\n        });\r\n~~~\r\n\r\n~~~\r\nAction: copy \r\nText: My text here\r\nTrigger: <button data-clipboard-target=\"#myTextArea\" class=\"copyBtn\">​\r\n~~~\r\n\r\nRemoving the `disabled` property on the textarea, clipboard functions as expected and text is copied."}}