@vaadin/virtual-list 23.5.11 → 23.5.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 +8 -8
- package/src/vaadin-virtual-list.js +20 -25
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/virtual-list",
|
|
3
|
-
"version": "23.5.
|
|
3
|
+
"version": "23.5.12",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@polymer/polymer": "^3.0.0",
|
|
41
|
-
"@vaadin/component-base": "~23.5.
|
|
42
|
-
"@vaadin/lit-renderer": "~23.5.
|
|
43
|
-
"@vaadin/vaadin-lumo-styles": "~23.5.
|
|
44
|
-
"@vaadin/vaadin-material-styles": "~23.5.
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "~23.5.
|
|
41
|
+
"@vaadin/component-base": "~23.5.12",
|
|
42
|
+
"@vaadin/lit-renderer": "~23.5.12",
|
|
43
|
+
"@vaadin/vaadin-lumo-styles": "~23.5.12",
|
|
44
|
+
"@vaadin/vaadin-material-styles": "~23.5.12",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "~23.5.12"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@esm-bundle/chai": "^4.3.4",
|
|
49
|
-
"@vaadin/polymer-legacy-adapter": "~23.5.
|
|
49
|
+
"@vaadin/polymer-legacy-adapter": "~23.5.12",
|
|
50
50
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
51
51
|
"lit": "^2.0.0",
|
|
52
52
|
"sinon": "^13.0.2"
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"web-types.json",
|
|
56
56
|
"web-types.lit.json"
|
|
57
57
|
],
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "649d4656babb0403813ce4f797e1fc4484b0dd11"
|
|
59
59
|
}
|
|
@@ -112,7 +112,7 @@ class VirtualList extends ElementMixin(ControllerMixin(ThemableMixin(PolymerElem
|
|
|
112
112
|
|
|
113
113
|
constructor() {
|
|
114
114
|
super();
|
|
115
|
-
this.
|
|
115
|
+
this.__onDocumentDragStart = this.__onDocumentDragStart.bind(this);
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
/** @protected */
|
|
@@ -136,17 +136,13 @@ class VirtualList extends ElementMixin(ControllerMixin(ThemableMixin(PolymerElem
|
|
|
136
136
|
/** @protected */
|
|
137
137
|
connectedCallback() {
|
|
138
138
|
super.connectedCallback();
|
|
139
|
-
|
|
140
|
-
// that have children with massive heights. This workaround prevents crashes
|
|
141
|
-
// and performance issues by excluding the items from the drag image.
|
|
142
|
-
// https://github.com/vaadin/web-components/issues/7985
|
|
143
|
-
document.addEventListener('dragstart', this.__onDragStart, { capture: true });
|
|
139
|
+
document.addEventListener('dragstart', this.__onDocumentDragStart, { capture: true });
|
|
144
140
|
}
|
|
145
141
|
|
|
146
142
|
/** @protected */
|
|
147
143
|
disconnectedCallback() {
|
|
148
144
|
super.disconnectedCallback();
|
|
149
|
-
document.removeEventListener('dragstart', this.
|
|
145
|
+
document.removeEventListener('dragstart', this.__onDocumentDragStart, { capture: true });
|
|
150
146
|
}
|
|
151
147
|
|
|
152
148
|
/**
|
|
@@ -200,25 +196,24 @@ class VirtualList extends ElementMixin(ControllerMixin(ThemableMixin(PolymerElem
|
|
|
200
196
|
}
|
|
201
197
|
}
|
|
202
198
|
|
|
203
|
-
/**
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
this.style.
|
|
199
|
+
/**
|
|
200
|
+
* Webkit-based browsers have issues with generating drag images
|
|
201
|
+
* for elements that have children with massive heights. Chromium
|
|
202
|
+
* browsers crash, while Safari experiences significant performance
|
|
203
|
+
* issues. To mitigate these issues, we hide the items container
|
|
204
|
+
* when drag starts to remove it from the drag image.
|
|
205
|
+
*
|
|
206
|
+
* Related issues:
|
|
207
|
+
* - https://github.com/vaadin/web-components/issues/7985
|
|
208
|
+
* - https://issues.chromium.org/issues/383356871
|
|
209
|
+
*
|
|
210
|
+
* @private
|
|
211
|
+
*/
|
|
212
|
+
__onDocumentDragStart(e) {
|
|
213
|
+
if (e.target.contains(this) && this.scrollHeight > 20000) {
|
|
214
|
+
this.$.items.style.display = 'none';
|
|
219
215
|
requestAnimationFrame(() => {
|
|
220
|
-
this.$.items.style.
|
|
221
|
-
this.style.overflow = initialVirtualListOverflow;
|
|
216
|
+
this.$.items.style.display = '';
|
|
222
217
|
});
|
|
223
218
|
}
|
|
224
219
|
}
|
package/web-types.json
CHANGED