Prevent auto-zooming on an iphone by making the text area size appropriate size. Fixes Issue 180.

This commit is contained in:
speedplane 2016-02-04 11:12:04 -05:00
parent a88bb77be4
commit bd6dc9eb9f

View File

@ -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', '');