From d7785831fde7f0b384084e79632df272fb083b19 Mon Sep 17 00:00:00 2001 From: Jack Moore Date: Mon, 25 Jul 2016 18:10:57 -0400 Subject: [PATCH] removed undocumented argument, doubtful it was ever used by anyone. --- src/autosize.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/autosize.js b/src/autosize.js index 6fb7368..eb11778 100644 --- a/src/autosize.js +++ b/src/autosize.js @@ -26,7 +26,7 @@ try { }; } -function assign(ta, {setOverflowX = true, setOverflowY = true} = {}) { +function assign(ta) { if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || set.has(ta)) return; let heightOffset = null; @@ -73,9 +73,7 @@ function assign(ta, {setOverflowX = true, setOverflowY = true} = {}) { overflowY = value; - if (setOverflowY) { - ta.style.overflowY = value; - } + ta.style.overflowY = value; resize(); } @@ -187,11 +185,8 @@ function assign(ta, {setOverflowX = true, setOverflowY = true} = {}) { ta.addEventListener('input', update, false); ta.addEventListener('autosize:update', update, false); set.add(ta); - - if (setOverflowX) { - ta.style.overflowX = 'hidden'; - ta.style.wordWrap = 'break-word'; - } + ta.style.overflowX = 'hidden'; + ta.style.wordWrap = 'break-word'; init(); }