Skip to content

Commit

Permalink
Resets invisible textarea's paddings and margins #179
Browse files Browse the repository at this point in the history
  • Loading branch information
zenorocha committed Feb 4, 2016
1 parent bd6dc9e commit 4c9e29a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/clipboard-action.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ export default class ClipboardAction {
this.fakeHandler = document.body.addEventListener('click', () => this.removeFake());

this.fakeElem = document.createElement('textarea');
this.fakeElem.style.padding = '0';
this.fakeElem.style.margin = '0';
this.fakeElem.style.position = 'absolute';
this.fakeElem.style.fontSize = '12pt'; // Prevent zooming on iPhones.
this.fakeElem.style[ isRTL ? 'right' : 'left' ] = '-9999px';
Expand Down

0 comments on commit 4c9e29a

Please sign in to comment.