Skip to content

Commit

Permalink
Merge pull request jackmoore#253 from Venki-Ricardo/master
Browse files Browse the repository at this point in the history
Fix when a textarea is not on document body and heightOffset is Not a…
  • Loading branch information
jackmoore committed Sep 2, 2015
2 parents 09db6a2 + b63fa1a commit 18fbcf6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/autosize.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 18fbcf6

Please sign in to comment.