@vaadin/text-area 25.0.10 → 25.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/text-area",
3
- "version": "25.0.10",
3
+ "version": "25.0.12",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -34,24 +34,24 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@open-wc/dedupe-mixin": "^1.3.0",
37
- "@vaadin/a11y-base": "~25.0.10",
38
- "@vaadin/component-base": "~25.0.10",
39
- "@vaadin/field-base": "~25.0.10",
40
- "@vaadin/input-container": "~25.0.10",
41
- "@vaadin/vaadin-themable-mixin": "~25.0.10",
37
+ "@vaadin/a11y-base": "~25.0.12",
38
+ "@vaadin/component-base": "~25.0.12",
39
+ "@vaadin/field-base": "~25.0.12",
40
+ "@vaadin/input-container": "~25.0.12",
41
+ "@vaadin/vaadin-themable-mixin": "~25.0.12",
42
42
  "lit": "^3.0.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@vaadin/aura": "~25.0.10",
46
- "@vaadin/chai-plugins": "~25.0.10",
47
- "@vaadin/test-runner-commands": "~25.0.10",
45
+ "@vaadin/aura": "~25.0.12",
46
+ "@vaadin/chai-plugins": "~25.0.12",
47
+ "@vaadin/test-runner-commands": "~25.0.12",
48
48
  "@vaadin/testing-helpers": "^2.0.0",
49
- "@vaadin/vaadin-lumo-styles": "~25.0.10",
49
+ "@vaadin/vaadin-lumo-styles": "~25.0.12",
50
50
  "sinon": "^21.0.0"
51
51
  },
52
52
  "web-types": [
53
53
  "web-types.json",
54
54
  "web-types.lit.json"
55
55
  ],
56
- "gitHead": "80732bb10625de5041741a655fd7683287698fb8"
56
+ "gitHead": "4da2fac35ba4a02254c6e18c8392fa445d873d13"
57
57
  }
@@ -160,6 +160,7 @@ export const TextAreaMixin = (superClass) =>
160
160
  }
161
161
 
162
162
  const scrollTop = inputField.scrollTop;
163
+ const previousExplicitHeight = parseFloat(input.style.height);
163
164
 
164
165
  // Only clear the height when the content shortens to minimize scrollbar flickering.
165
166
  const valueLength = this.value ? this.value.length : 0;
@@ -184,7 +185,14 @@ export const TextAreaMixin = (superClass) =>
184
185
  this._oldValueLength = valueLength;
185
186
 
186
187
  const inputHeight = input.scrollHeight;
187
- if (inputHeight > input.clientHeight) {
188
+ // Snap to the previous explicit height when the new measurement is
189
+ // within 1 CSS pixel of it. The pin/unpin cycle produces a 1 px
190
+ // asymmetry on low-DPR displays that would otherwise oscillate
191
+ // visibly on every keystroke; real content changes always move
192
+ // scrollHeight by at least one line.
193
+ if (Math.abs(inputHeight - previousExplicitHeight) <= 1) {
194
+ input.style.height = `${previousExplicitHeight}px`;
195
+ } else if (inputHeight > input.clientHeight) {
188
196
  input.style.height = `${inputHeight}px`;
189
197
  }
190
198
 
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/text-area",
4
- "version": "25.0.10",
4
+ "version": "25.0.12",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/text-area",
4
- "version": "25.0.10",
4
+ "version": "25.0.12",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {