From 6ae70cd3d28888eb858eef1167e6ed75d25dff7f Mon Sep 17 00:00:00 2001 From: Jack Moore Date: Mon, 30 Apr 2018 21:48:25 -0400 Subject: [PATCH] More specific detection of when to change overflow. Merges #361 --- changelog.md | 7 +++++-- dist/autosize.js | 4 ++-- dist/autosize.min.js | 4 ++-- package.json | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/changelog.md b/changelog.md index cea61c0..5d723ee 100644 --- a/changelog.md +++ b/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. diff --git a/dist/autosize.js b/dist/autosize.js index 78f314c..ae609f6 100644 --- a/dist/autosize.js +++ b/dist/autosize.js @@ -1,5 +1,5 @@ /*! - autosize 4.0.1 + autosize 4.0.2 license: MIT http://www.jacklmoore.com/autosize */ @@ -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(); diff --git a/dist/autosize.min.js b/dist/autosize.min.js index 0551d5b..4d9b4e9 100644 --- a/dist/autosize.min.js +++ b/dist/autosize.min.js @@ -1,6 +1,6 @@ /*! - autosize 4.0.1 + autosize 4.0.2 license: MIT http://www.jacklmoore.com/autosize */ -!function(e,t){if("function"==typeof define&&define.amd)define(["module","exports"],t);else if("undefined"!=typeof exports)t(module,exports);else{var n={exports:{}};t(n,n.exports),e.autosize=n.exports}}(this,function(e,t){"use strict";var n,o,p="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return-1