diff options
Diffstat (limited to 'jquery.autosize.js')
-rw-r--r-- | jquery.autosize.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/jquery.autosize.js b/jquery.autosize.js index d84ce5e..4e96699 100644 --- a/jquery.autosize.js +++ b/jquery.autosize.js @@ -1,5 +1,5 @@ /*! - Autosize 1.18.17 + Autosize 1.18.18 license: MIT http://www.jacklmoore.com/autosize */ @@ -14,9 +14,6 @@ placeholder: true }, - // border:0 is unnecessary, but avoids a bug in Firefox on OSX - copy = '<textarea tabindex="-1" style="position:absolute; top:-999px; left:0; right:auto; bottom:auto; border:0; padding: 0; -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box; word-wrap:break-word; height:0 !important; min-height:0 !important; overflow:hidden; transition:none; -webkit-transition:none; -moz-transition:none;"/>', - // line-height is conditionally included because IE7/IE8/old Opera do not return the correct value. typographyStyles = [ 'fontFamily', @@ -34,7 +31,10 @@ mirrored, // the mirror element, which is used to calculate what size the mirrored element should be. - mirror = $(copy).data('autosize', true)[0]; + mirror = $('<textarea tabindex="-1"/>').data('autosize', true)[0]; + + // border:0 is unnecessary, but avoids a bug in Firefox on OSX + mirror.style.cssText = "position:absolute; top:-999px; left:0; right:auto; bottom:auto; border:0; padding: 0; -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box; word-wrap:break-word; height:0 !important; min-height:0 !important; overflow:hidden; transition:none; -webkit-transition:none; -moz-transition:none;"; // test that line-height can be accurately copied. mirror.style.lineHeight = '99px'; |