@vaadin/text-area 23.1.1 → 23.2.0-dev.8a7678b70
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 +8 -8
- package/src/vaadin-text-area.js +18 -23
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/text-area",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.2.0-dev.8a7678b70",
|
|
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": "
|
|
37
|
-
"@vaadin/field-base": "
|
|
38
|
-
"@vaadin/input-container": "
|
|
39
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
40
|
-
"@vaadin/vaadin-material-styles": "
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
36
|
+
"@vaadin/component-base": "23.2.0-dev.8a7678b70",
|
|
37
|
+
"@vaadin/field-base": "23.2.0-dev.8a7678b70",
|
|
38
|
+
"@vaadin/input-container": "23.2.0-dev.8a7678b70",
|
|
39
|
+
"@vaadin/vaadin-lumo-styles": "23.2.0-dev.8a7678b70",
|
|
40
|
+
"@vaadin/vaadin-material-styles": "23.2.0-dev.8a7678b70",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "23.2.0-dev.8a7678b70"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@esm-bundle/chai": "^4.3.4",
|
|
45
45
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
46
46
|
"sinon": "^13.0.2"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "85b403f96d8282f262322b56c0ff4289f843d02a"
|
|
49
49
|
}
|
package/src/vaadin-text-area.js
CHANGED
|
@@ -201,29 +201,6 @@ export class TextArea extends ResizeMixin(PatternMixin(InputFieldMixin(ThemableM
|
|
|
201
201
|
return this.$.clearButton;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
/** @protected */
|
|
205
|
-
connectedCallback() {
|
|
206
|
-
super.connectedCallback();
|
|
207
|
-
|
|
208
|
-
this._inputField = this.shadowRoot.querySelector('[part=input-field]');
|
|
209
|
-
|
|
210
|
-
// Wheel scrolling results in async scroll events. Preventing the wheel
|
|
211
|
-
// event, scrolling manually and then synchronously updating the scroll position CSS variable
|
|
212
|
-
// allows us to avoid some jumpy behavior that would occur on wheel otherwise.
|
|
213
|
-
this._inputField.addEventListener('wheel', (e) => {
|
|
214
|
-
const scrollTopBefore = this._inputField.scrollTop;
|
|
215
|
-
this._inputField.scrollTop += e.deltaY;
|
|
216
|
-
|
|
217
|
-
if (scrollTopBefore !== this._inputField.scrollTop) {
|
|
218
|
-
e.preventDefault();
|
|
219
|
-
this.__scrollPositionUpdated();
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
this._updateHeight();
|
|
224
|
-
this.__scrollPositionUpdated();
|
|
225
|
-
}
|
|
226
|
-
|
|
227
204
|
/**
|
|
228
205
|
* @protected
|
|
229
206
|
* @override
|
|
@@ -246,6 +223,24 @@ export class TextArea extends ResizeMixin(PatternMixin(InputFieldMixin(ThemableM
|
|
|
246
223
|
);
|
|
247
224
|
this.addController(new LabelledInputController(this.inputElement, this._labelController));
|
|
248
225
|
this.addEventListener('animationend', this._onAnimationEnd);
|
|
226
|
+
|
|
227
|
+
this._inputField = this.shadowRoot.querySelector('[part=input-field]');
|
|
228
|
+
|
|
229
|
+
// Wheel scrolling results in async scroll events. Preventing the wheel
|
|
230
|
+
// event, scrolling manually and then synchronously updating the scroll position CSS variable
|
|
231
|
+
// allows us to avoid some jumpy behavior that would occur on wheel otherwise.
|
|
232
|
+
this._inputField.addEventListener('wheel', (e) => {
|
|
233
|
+
const scrollTopBefore = this._inputField.scrollTop;
|
|
234
|
+
this._inputField.scrollTop += e.deltaY;
|
|
235
|
+
|
|
236
|
+
if (scrollTopBefore !== this._inputField.scrollTop) {
|
|
237
|
+
e.preventDefault();
|
|
238
|
+
this.__scrollPositionUpdated();
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
this._updateHeight();
|
|
243
|
+
this.__scrollPositionUpdated();
|
|
249
244
|
}
|
|
250
245
|
|
|
251
246
|
/** @private */
|