From bd6dc9eb9f8d6ebb0d56217e1a9b0a96ab379f8c Mon Sep 17 00:00:00 2001 From: speedplane Date: Thu, 4 Feb 2016 11:12:04 -0500 Subject: [PATCH] Prevent auto-zooming on an iphone by making the text area size appropriate size. Fixes Issue 180. --- src/clipboard-action.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/clipboard-action.js b/src/clipboard-action.js index c86eda1..07ff183 100644 --- a/src/clipboard-action.js +++ b/src/clipboard-action.js @@ -59,6 +59,7 @@ export default class ClipboardAction { this.fakeElem = document.createElement('textarea'); this.fakeElem.style.position = 'absolute'; + this.fakeElem.style.fontSize = '12pt'; // Prevent zooming on iPhones. this.fakeElem.style[ isRTL ? 'right' : 'left' ] = '-9999px'; this.fakeElem.style.top = (window.pageYOffset || document.documentElement.scrollTop) + 'px'; this.fakeElem.setAttribute('readonly', '');