diff --git a/src/autosize.js b/src/autosize.js index 1859937..1549070 100644 --- a/src/autosize.js +++ b/src/autosize.js @@ -18,7 +18,10 @@ function assign(ta, {setOverflowX = true, setOverflowY = true} = {}) { } else { heightOffset = parseFloat(style.borderTopWidth)+parseFloat(style.borderBottomWidth); } - + // Fix when a textarea is not on document body and heightOffset is Not a Number + if (isNaN(heightOffset)) + heightOffset = 0; + update(); }