Skip to content

Commit

Permalink
Changed how Autosize determines the inital height. Fixes jackmoore#336.
Browse files Browse the repository at this point in the history
  • Loading branch information
jackmoore committed Jul 12, 2017
1 parent 5284a46 commit 113f1b3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
5 changes: 4 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
## Changelog

##### v.3.0.21 - 2016-05-19
##### v.4.0.0 - 2017-07-12
* Changed how Autosize determines the inital height. Fixes #336.

##### v.3.0.21 - 2017-05-19
* Fixed bug with overflow detection which degraded performance of textareas that exceed their max-width. Fixes #333.

##### v.3.0.20 - 2016-12-04
Expand Down
4 changes: 2 additions & 2 deletions dist/autosize.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
Autosize 3.0.21
Autosize 4.0.0
license: MIT
http://www.jacklmoore.com/autosize
*/
Expand Down Expand Up @@ -126,7 +126,7 @@
var overflows = getParentOverflows(ta);
var docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)

ta.style.height = 'auto';
ta.style.height = '';

var endHeight = ta.scrollHeight + heightOffset;

Expand Down
4 changes: 2 additions & 2 deletions dist/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": "autosize",
"description": "Autosize is a small, stand-alone script to automatically adjust textarea height to fit text.",
"version": "3.0.21",
"version": "4.0.0",
"keywords": [
"textarea",
"form",
Expand Down
2 changes: 1 addition & 1 deletion src/autosize.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function assign(ta) {
const overflows = getParentOverflows(ta);
const docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)

ta.style.height = 'auto';
ta.style.height = '';

let endHeight = ta.scrollHeight+heightOffset;

Expand Down

0 comments on commit 113f1b3

Please sign in to comment.