From 4c9e29a0dc9a0502ec62640f82462ab609308d84 Mon Sep 17 00:00:00 2001 From: Zeno Rocha Date: Thu, 4 Feb 2016 11:09:10 -0800 Subject: [PATCH] Resets invisible textarea's paddings and margins #179 --- src/clipboard-action.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/clipboard-action.js b/src/clipboard-action.js index 07ff183..03bb5f1 100644 --- a/src/clipboard-action.js +++ b/src/clipboard-action.js @@ -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';