autosize 2.3.0.21 → 2.4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/autosize/version.rb +1 -1
- data/vendor/assets/javascripts/autosize.js +10 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38f9a1921748acf785cf4684a479f295b6569b86
|
4
|
+
data.tar.gz: 25d8d9e15abc13f4868667fabaeca1155cd0b32d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90879c9975e5484e8a112c73f6696f483ef433c493006321a6e424a13d45c4b094e7b59dbfcfbd27916f9ac50159b4b0a612cc0ee3fe55fff09a24dcbd2ce206
|
7
|
+
data.tar.gz: 8a301250c3c0bbc818c407b75b1f98cdd85ddc133c812b181c3a1979dab4aedf35752a95936076a2b8a8c8e4a26cf5d1e7220dd833d932918a0f38618a1aad03
|
data/lib/autosize/version.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
Autosize
|
2
|
+
Autosize 4.0.0
|
3
3
|
license: MIT
|
4
4
|
http://www.jacklmoore.com/autosize
|
5
5
|
*/
|
@@ -126,7 +126,7 @@
|
|
126
126
|
var overflows = getParentOverflows(ta);
|
127
127
|
var docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)
|
128
128
|
|
129
|
-
ta.style.height = '
|
129
|
+
ta.style.height = '';
|
130
130
|
|
131
131
|
var endHeight = ta.scrollHeight + heightOffset;
|
132
132
|
|
@@ -156,22 +156,24 @@
|
|
156
156
|
|
157
157
|
var styleHeight = Math.round(parseFloat(ta.style.height));
|
158
158
|
var computed = window.getComputedStyle(ta, null);
|
159
|
-
|
159
|
+
|
160
|
+
// Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box
|
161
|
+
var actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight;
|
160
162
|
|
161
163
|
// The actual height not matching the style height (set via the resize method) indicates that
|
162
|
-
// the max-height has been exceeded, in which case the overflow should be
|
164
|
+
// the max-height has been exceeded, in which case the overflow should be allowed.
|
163
165
|
if (actualHeight !== styleHeight) {
|
164
|
-
if (computed.overflowY
|
165
|
-
changeOverflow('
|
166
|
+
if (computed.overflowY === 'hidden') {
|
167
|
+
changeOverflow('scroll');
|
166
168
|
resize();
|
167
|
-
actualHeight = Math.round(parseFloat(window.getComputedStyle(ta, null).height));
|
169
|
+
actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
|
168
170
|
}
|
169
171
|
} else {
|
170
172
|
// Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.
|
171
173
|
if (computed.overflowY !== 'hidden') {
|
172
174
|
changeOverflow('hidden');
|
173
175
|
resize();
|
174
|
-
actualHeight = Math.round(parseFloat(window.getComputedStyle(ta, null).height));
|
176
|
+
actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
|
175
177
|
}
|
176
178
|
}
|
177
179
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autosize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jack Moore
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-07-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|