From ca43a28d0e7404fc3ebe6820d0b03abfa9c6a5ef Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sun, 17 Dec 2017 21:37:29 +0000 Subject: [PATCH] Fix copy to clipboard for iOS 10/11 --- core/modules/utils/dom/dom.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/modules/utils/dom/dom.js b/core/modules/utils/dom/dom.js index 739344c98..c21b5638b 100644 --- a/core/modules/utils/dom/dom.js +++ b/core/modules/utils/dom/dom.js @@ -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");