Skip to content

Commit

Permalink
Minor change to not append the mirror element when the plugin is appl…
Browse files Browse the repository at this point in the history
…ied to an empty jQuery collection.

(jackmoore#65 (comment))
  • Loading branch information
jackmoore committed Sep 7, 2013
1 parent ce3016b commit 1baef2a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion autosize.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "autosize",
"title": "Autosize",
"description": "Automatically adjust textarea height based on user input.",
"version": "1.17.7",
"version": "1.17.8",
"dependencies": {
"jquery": ">=1.7"
},
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jquery-autosize",
"description": "Automatically adjust textarea height based on user input.",
"version": "1.17.7",
"version": "1.17.8",
"dependencies": {
"jquery": ">=1.7"
},
Expand Down
6 changes: 5 additions & 1 deletion jquery.autosize.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
Autosize v1.17.7 - 2013-09-03
Autosize v1.17.8 - 2013-09-07
Automatically adjust textarea height based on user input.
(c) 2013 Jack Moore - http://www.jacklmoore.com/autosize
license: http://www.opensource.org/licenses/mit-license.php
Expand Down Expand Up @@ -50,6 +50,10 @@
mirror.style.lineHeight = '';

$.fn.autosize = function (options) {
if (!this.length) {
return this;
}

options = $.extend({}, defaults, options || {});

if (mirror.parentNode !== document.body) {
Expand Down
4 changes: 2 additions & 2 deletions jquery.autosize.min.js

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jquery-autosize",
"description": "Automatically adjust textarea height based on user input.",
"version": "1.17.7",
"version": "1.17.8",
"dependencies": {},
"keywords": [
"form",
Expand Down
3 changes: 3 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Small jQuery plugin to allow dynamic resizing of textarea height, so that it gro

## Changelog

### v1.17.8 - 2013/9/7
* Minor change to not append the mirror element when the plugin is applied to an empty jQuery collection

### v1.17.7 - 2013/9/3
* Reverted to an earlier fix for a Chrome issue. Too many issues with using setSelectionRange.

Expand Down

0 comments on commit 1baef2a

Please sign in to comment.