diff --git a/autosize.jquery.json b/autosize.jquery.json index 2d16b3e..30727bb 100644 --- a/autosize.jquery.json +++ b/autosize.jquery.json @@ -7,7 +7,7 @@ "textarea", "ui" ], - "version": "1.16.1", + "version": "1.16.2", "author": { "name": "Jack Moore", "url": "http://www.jacklmoore.com" diff --git a/component.json b/component.json index 03f9c8b..34a6927 100644 --- a/component.json +++ b/component.json @@ -1,8 +1,8 @@ { "name": "jquery-autosize", - "version": "1.16.1", + "version": "1.16.2", "main": "./jquery.autosize.js", "dependencies": { - "jquery": ">=1.4.2" + "jquery": ">=1.4" } } diff --git a/jquery.autosize.js b/jquery.autosize.js index e8a5444..24a85d2 100644 --- a/jquery.autosize.js +++ b/jquery.autosize.js @@ -1,4 +1,4 @@ -// Autosize 1.16.1 - jQuery plugin for textareas +// Autosize 1.16.2 - jQuery plugin for textareas // (c) 2013 Jack Moore - jacklmoore.com // license: www.opensource.org/licenses/mit-license.php (function ($) { @@ -64,12 +64,12 @@ return; } - minHeight = parseInt($ta.css('minHeight'), 10) || $ta.height(); - if ($ta.css('box-sizing') === borderBox || $ta.css('-moz-box-sizing') === borderBox || $ta.css('-webkit-box-sizing') === borderBox){ boxOffset = $ta.outerHeight() - $ta.height(); } + minHeight = Math.max(parseInt($ta.css('minHeight'), 10) - boxOffset, $ta.height()); + resize = ($ta.css('resize') === 'none' || $ta.css('resize') === 'vertical') ? 'none' : 'horizontal'; $ta.css({ diff --git a/readme.md b/readme.md index e306805..9d76a22 100644 --- a/readme.md +++ b/readme.md @@ -4,6 +4,9 @@ Small jQuery plugin to allow dynamic resizing of textarea height, so that it gro ## Changelog +### Version 1.16 - 2013/1/20 +* Minor fixes. + ### Version 1.15 - November 16, 2012 * Reworked to only create a single mirror element, instead of one for each textarea. * Dropped feature detection for FF3 and Safari 4.