@vaadin/text-area 22.0.5 → 22.0.8

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": "22.0.5",
3
+ "version": "22.0.8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -32,17 +32,17 @@
32
32
  ],
33
33
  "dependencies": {
34
34
  "@polymer/polymer": "^3.0.0",
35
- "@vaadin/component-base": "^22.0.5",
36
- "@vaadin/field-base": "^22.0.5",
37
- "@vaadin/input-container": "^22.0.5",
38
- "@vaadin/vaadin-lumo-styles": "^22.0.5",
39
- "@vaadin/vaadin-material-styles": "^22.0.5",
40
- "@vaadin/vaadin-themable-mixin": "^22.0.5"
35
+ "@vaadin/component-base": "^22.0.8",
36
+ "@vaadin/field-base": "^22.0.8",
37
+ "@vaadin/input-container": "^22.0.8",
38
+ "@vaadin/vaadin-lumo-styles": "^22.0.8",
39
+ "@vaadin/vaadin-material-styles": "^22.0.8",
40
+ "@vaadin/vaadin-themable-mixin": "^22.0.8"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@esm-bundle/chai": "^4.3.4",
44
44
  "@vaadin/testing-helpers": "^0.3.2",
45
45
  "sinon": "^9.2.1"
46
46
  },
47
- "gitHead": "3e1990867670f3de2dec6fa1200d945623b2710c"
47
+ "gitHead": "6b6a1e5262588ae0f0b056e133f196dc93177264"
48
48
  }
@@ -110,7 +110,13 @@ export class TextArea extends InputFieldMixin(ThemableMixin(ElementMixin(Polymer
110
110
  box-shadow: none;
111
111
  }
112
112
 
113
- [part='input-field'] ::slotted(*) {
113
+ /* Override styles from <vaadin-input-container> */
114
+ [part='input-field'] ::slotted(textarea) {
115
+ align-self: stretch;
116
+ white-space: pre-wrap;
117
+ }
118
+
119
+ [part='input-field'] ::slotted(:not(textarea)) {
114
120
  align-self: flex-start;
115
121
  }
116
122
 
@@ -201,9 +207,13 @@ export class TextArea extends InputFieldMixin(ThemableMixin(ElementMixin(Polymer
201
207
  // event, scrolling manually and then synchronously updating the scroll position CSS variable
202
208
  // allows us to avoid some jumpy behavior that would occur on wheel otherwise.
203
209
  this._inputField.addEventListener('wheel', (e) => {
204
- e.preventDefault();
210
+ const scrollTopBefore = this._inputField.scrollTop;
205
211
  this._inputField.scrollTop += e.deltaY;
206
- this.__scrollPositionUpdated();
212
+
213
+ if (scrollTopBefore !== this._inputField.scrollTop) {
214
+ e.preventDefault();
215
+ this.__scrollPositionUpdated();
216
+ }
207
217
  });
208
218
 
209
219
  this._updateHeight();
@@ -51,8 +51,6 @@ const textArea = css`
51
51
  }
52
52
 
53
53
  [part='input-field'] ::slotted(textarea) {
54
- white-space: pre-wrap; /* override "nowrap" from <vaadin-text-field> */
55
- align-self: stretch; /* override "baseline" from <vaadin-text-field> */
56
54
  line-height: inherit;
57
55
  --_lumo-text-field-overflow-mask-image: none;
58
56
  }
@@ -17,11 +17,6 @@ const textArea = css`
17
17
  margin-top: 4px;
18
18
  }
19
19
 
20
- [part='input-field'] ::slotted(textarea) {
21
- white-space: pre-wrap; /* override "nowrap" from <vaadin-text-field> */
22
- align-self: stretch; /* override "baseline" from <vaadin-text-field> */
23
- }
24
-
25
20
  [part='input-field']::before,
26
21
  [part='input-field']::after {
27
22
  bottom: calc(var(--_text-area-vertical-scroll-position) * -1);