mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Fix copy to clipboard for iOS 10/11
This commit is contained in:
parent
34306983b2
commit
ca43a28d0e
@ -240,6 +240,7 @@ exports.copyToClipboard = function(text,options) {
|
||||
textArea.style.position = "fixed";
|
||||
textArea.style.top = 0;
|
||||
textArea.style.left = 0;
|
||||
textArea.style.fontSize = "12pt";
|
||||
textArea.style.width = "2em";
|
||||
textArea.style.height = "2em";
|
||||
textArea.style.padding = 0;
|
||||
@ -250,6 +251,7 @@ exports.copyToClipboard = function(text,options) {
|
||||
textArea.value = text;
|
||||
document.body.appendChild(textArea);
|
||||
textArea.select();
|
||||
textArea.setSelectionRange(0,text.length);
|
||||
var succeeded = false;
|
||||
try {
|
||||
succeeded = document.execCommand("copy");
|
||||
|
Loading…
Reference in New Issue
Block a user