mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
Prevent auto-zooming on an iphone by making the text area size appropriate size. Fixes Issue 180.
This commit is contained in:
parent
a88bb77be4
commit
bd6dc9eb9f
@ -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', '');
|
||||
|
Loading…
Reference in New Issue
Block a user