Skip to content

Commit

Permalink
More specific detection of when to change overflow. Merges #361
Browse files Browse the repository at this point in the history
  • Loading branch information
jackmoore committed May 1, 2018
1 parent 53a2e03 commit 6ae70cd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
7 changes: 5 additions & 2 deletions changelog.md
@@ -1,10 +1,13 @@
## Changelog

##### v.4.0.2 - 2018-04-30
* More specific detection of when to change overflow. Merges #361.

##### v.4.0.1 - 2018-03-23
* Minor refactor & updated build depedencies
* Minor refactor & updated build dependencies

##### v.4.0.0 - 2017-07-12
* Changed how Autosize determines the inital height. Fixes #336.
* Changed how Autosize determines the initial 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.
Expand Down
4 changes: 2 additions & 2 deletions dist/autosize.js
@@ -1,5 +1,5 @@
/*!
autosize 4.0.1
autosize 4.0.2
license: MIT
http://www.jacklmoore.com/autosize
*/
Expand Down Expand Up @@ -157,7 +157,7 @@

// The actual height not matching the style height (set via the resize method) indicates that
// the max-height has been exceeded, in which case the overflow should be allowed.
if (actualHeight !== styleHeight) {
if (actualHeight < styleHeight) {
if (computed.overflowY === 'hidden') {
changeOverflow('scroll');
resize();
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
@@ -1,7 +1,7 @@
{
"name": "autosize",
"description": "Autosize is a small, stand-alone script to automatically adjust textarea height to fit text.",
"version": "4.0.1",
"version": "4.0.2",
"keywords": [
"textarea",
"form",
Expand Down

0 comments on commit 6ae70cd

Please sign in to comment.