Skip to content

Commit

Permalink
Merge pull request jackmoore#50 from Leonidaz/master
Browse files Browse the repository at this point in the history
IE8 error Invalid argument when textarea has display:none
  • Loading branch information
Jack Moore committed Jan 17, 2013
2 parents 27d1467 + b1612cf commit 51c32e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jquery.autosize.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
original = parseInt(ta.style.height,10);

// Update the width in case the original textarea width has changed
mirror.style.width = $ta.width() + 'px';
mirror.style.width = ($ta.width() < 0 ? 0 : $ta.width()) + 'px';

// The following three lines can be replaced with `height = mirror.scrollHeight` when dropping IE7 support.
mirror.scrollTop = 0;
Expand Down

0 comments on commit 51c32e0

Please sign in to comment.