@vaadin/text-area 23.0.0-rc1 → 23.0.2
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": "23.0.
|
|
3
|
+
"version": "23.0.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@polymer/polymer": "^3.0.0",
|
|
36
|
-
"@vaadin/component-base": "23.0.
|
|
37
|
-
"@vaadin/field-base": "23.0.
|
|
38
|
-
"@vaadin/input-container": "23.0.
|
|
39
|
-
"@vaadin/vaadin-lumo-styles": "23.0.
|
|
40
|
-
"@vaadin/vaadin-material-styles": "23.0.
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "23.0.
|
|
36
|
+
"@vaadin/component-base": "^23.0.2",
|
|
37
|
+
"@vaadin/field-base": "^23.0.2",
|
|
38
|
+
"@vaadin/input-container": "^23.0.2",
|
|
39
|
+
"@vaadin/vaadin-lumo-styles": "^23.0.2",
|
|
40
|
+
"@vaadin/vaadin-material-styles": "^23.0.2",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "^23.0.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@esm-bundle/chai": "^4.3.4",
|
|
45
45
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
46
46
|
"sinon": "^9.2.1"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "a50f708dc0fe7d0cc10763f413838d71b1a0788b"
|
|
49
49
|
}
|
package/src/vaadin-text-area.js
CHANGED
|
@@ -114,7 +114,13 @@ export class TextArea extends ResizeMixin(PatternMixin(InputFieldMixin(ThemableM
|
|
|
114
114
|
box-shadow: none;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
/* Override styles from <vaadin-input-container> */
|
|
118
|
+
[part='input-field'] ::slotted(textarea) {
|
|
119
|
+
align-self: stretch;
|
|
120
|
+
white-space: pre-wrap;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
[part='input-field'] ::slotted(:not(textarea)) {
|
|
118
124
|
align-self: flex-start;
|
|
119
125
|
}
|
|
120
126
|
|
|
@@ -205,9 +211,13 @@ export class TextArea extends ResizeMixin(PatternMixin(InputFieldMixin(ThemableM
|
|
|
205
211
|
// event, scrolling manually and then synchronously updating the scroll position CSS variable
|
|
206
212
|
// allows us to avoid some jumpy behavior that would occur on wheel otherwise.
|
|
207
213
|
this._inputField.addEventListener('wheel', (e) => {
|
|
208
|
-
|
|
214
|
+
const scrollTopBefore = this._inputField.scrollTop;
|
|
209
215
|
this._inputField.scrollTop += e.deltaY;
|
|
210
|
-
|
|
216
|
+
|
|
217
|
+
if (scrollTopBefore !== this._inputField.scrollTop) {
|
|
218
|
+
e.preventDefault();
|
|
219
|
+
this.__scrollPositionUpdated();
|
|
220
|
+
}
|
|
211
221
|
});
|
|
212
222
|
|
|
213
223
|
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);
|