Skip to content

Commit

Permalink
Fixed a conflict with direction:ltr pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
jackmoore committed Jan 29, 2013
1 parent fec6094 commit 4073ea7
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 28 deletions.
7 changes: 4 additions & 3 deletions autosize.jquery.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"name": "autosize",
"title": "Autosize",
"description": "enables automatic height for textarea elements",
"description": "Allows textarea elements to automatically adjust their height based on user input.",
"keywords": [
"form",
"textarea",
"ui"
],
"version": "1.16.3",
"version": "1.16.4",
"author": {
"name": "Jack Moore",
"url": "http://www.jacklmoore.com"
"url": "http://www.jacklmoore.com",
"email": "[email protected]"
},
"licenses": [
{
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery-autosize",
"version": "1.16.3",
"version": "1.16.4",
"main": "./jquery.autosize.js",
"dependencies": {
"jquery": ">=1.4"
Expand Down
6 changes: 3 additions & 3 deletions jquery.autosize-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions jquery.autosize.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/*
jQuery Autosize v1.16.3
jQuery Autosize v1.16.4
(c) 2013 Jack Moore - jacklmoore.com
updated: 2013-01-23
updated: 2013-01-29
license: http://www.opensource.org/licenses/mit-license.php
*/

(function ($) {
var
defaults = {
Expand All @@ -16,7 +17,7 @@
lineHeight = 'lineHeight',

// border:0 is unnecessary, but avoids a bug in FireFox on OSX (http://www.jacklmoore.com/autosize#comment-851)
copy = '<textarea tabindex="-1" style="position:absolute; top:-9999px; left:-9999px; right:auto; bottom:auto; border: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;"/>',
copy = '<textarea tabindex="-1" style="position:absolute; top:-999px; left:0; right:auto; bottom:auto; border: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;"/>',

// line-height is conditionally included because IE7/IE8/old Opera do not return the correct value.
copyStyle = [
Expand Down
45 changes: 27 additions & 18 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,62 +4,71 @@ Small jQuery plugin to allow dynamic resizing of textarea height, so that it gro

## Changelog

### Version 1.16 - 2013/1/20
* Minor fixes.
### v1.16.4 - 2013/1/29
* Fixed a conflict with direction:ltr pages.

### Version 1.15 - November 16, 2012
### v1.16.3 - 2013/1/23
* Added minified file back to repository

### v1.16.2 - 2013/1/20
* Minor boxsizing issue dealing with min-heights.

### v1.16.1 - 2013/1/20
* Added to plugins.jquery.com

### v1.15 - 2012/11/16
* Reworked to only create a single mirror element, instead of one for each textarea.
* Dropped feature detection for FF3 and Safari 4.

### Version 1.14 - October 6, 2012
### v1.14 - 2012/10/6
* Added 'append' option for appending whitespace to the end of the height calculation (an extra newline improves the apperance when animating).
* Added a demonstration of animating the height change using a CSS transition.

### Version 1.13 - September 21, 2012
### v1.13 - 2012/9/21
* Added optional callback that fires after resize.

### Version 1.12 - September 3, 2012
### v1.12 - 2012/9/3
* Fixed a bug I introduced in the last update.

### Version 1.11 - August 8, 2012
### v1.11 - 2012/8/8
* Added workaround to get Chrome to reflow default text better.

### Version 1.10 - July 30, 2012
### v1.10 - 2012/4/30
* Added 'lineHeight' to the list of styles considered for size detection.

### Version 1.9 - June 19, 2012
### v1.9 - 2012/6/19
* Added 'textIndent' to the list of styles considered for size detection.
* Added vender prefixes to box-sizing detection

### Version 1.8 - June 7, 2012
### v1.8 - 2012/6/7
* Added conditional so that autosize cannot be applied twice to the same element
* When autosize is applied to an element, it will have a data property that links it to the mirrored textarea element. This will make it easier to keep track of and remove unneeded mirror elements. Example:

$('textarea.example').data('mirror').remove(); // delete the mirror

$('textarea.example').remove(); // delete the original

### Version 1.7 - May 3, 2012
### v1.7 - 2012/5/3
* Now supports box-sizing:border-box

### Version 1.6 - February 11, 2012
### v1.6 - 2012/2/11
* added binding to allow autosize to be triggered manually. Example:
$('#myTextArea').trigger('autosize');

### Version 1.5 - December 7, 2011
### v1.5 - 2011/12/7
* fixed a regression in detecting FireFox support

### Version 1.4 - November 22, 2011
### v1.4 - 2011/11/22
* added branching to exclude old browsers (FF3- & Safari4-)

### Version 1.3 - November 13, 2011
### v1.3 - 2011/11/13
* fixed a regression in 1.1 relating to Opera.

### Version 1.2 - November 10, 2011
### v1.2 - 2011/11/10
* fixed a regression in 1.1 that broke autosize for IE9.

### Version 1.1 - November 10, 2011
### v1.1 - 2011/11/10
* autosize now follows the max-height of textareas. OverflowY will be set to scroll once the content height exceeds max-height.

### Version 1.0 - November 7, 2011
### v1.0 - 2011/11/7
* first release

0 comments on commit 4073ea7

Please sign in to comment.