diff options
author | Reto Kaiser <reto@cargomedia.ch> | 2014-12-09 10:53:35 +0100 |
---|---|---|
committer | Reto Kaiser <reto@cargomedia.ch> | 2014-12-09 10:53:35 +0100 |
commit | a9af470880f2a835698621a391e933cf7f20a21c (patch) | |
tree | afde513e2983efe545dd28a8d9c2fa43026b36c7 | |
parent | 74b792e6801f680c9c79ace8d4b07c9c1b3993e8 (diff) | |
download | autosize-a9af470880f2a835698621a391e933cf7f20a21c.zip autosize-a9af470880f2a835698621a391e933cf7f20a21c.tar.gz autosize-a9af470880f2a835698621a391e933cf7f20a21c.tar.bz2 |
Make sure "original" is always a number (ta.style.height can be undefined)
-rw-r--r-- | jquery.autosize.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/jquery.autosize.js b/jquery.autosize.js index 8f1c798..2e40a91 100644 --- a/jquery.autosize.js +++ b/jquery.autosize.js @@ -176,7 +176,7 @@ mirror.value += options.append || ''; mirror.style.overflowY = ta.style.overflowY; - original = parseFloat(ta.style.height); + original = parseFloat(ta.style.height) || 0; // Setting scrollTop to zero is needed in IE8 and lower for the next step to be accurately applied mirror.scrollTop = 0; |