@vaadin/vaadin-overlay 23.2.2 → 23.2.4
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/vaadin-overlay",
|
|
3
|
-
"version": "23.2.
|
|
3
|
+
"version": "23.2.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,20 +35,20 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@polymer/polymer": "^3.0.0",
|
|
38
|
-
"@vaadin/component-base": "~23.2.
|
|
39
|
-
"@vaadin/vaadin-lumo-styles": "~23.2.
|
|
40
|
-
"@vaadin/vaadin-material-styles": "~23.2.
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "~23.2.
|
|
38
|
+
"@vaadin/component-base": "~23.2.4",
|
|
39
|
+
"@vaadin/vaadin-lumo-styles": "~23.2.4",
|
|
40
|
+
"@vaadin/vaadin-material-styles": "~23.2.4",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "~23.2.4"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@esm-bundle/chai": "^4.3.4",
|
|
45
45
|
"@polymer/iron-overlay-behavior": "^3.0.0",
|
|
46
|
-
"@vaadin/button": "~23.2.
|
|
47
|
-
"@vaadin/radio-group": "~23.2.
|
|
46
|
+
"@vaadin/button": "~23.2.4",
|
|
47
|
+
"@vaadin/radio-group": "~23.2.4",
|
|
48
48
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
49
|
-
"@vaadin/text-field": "~23.2.
|
|
49
|
+
"@vaadin/text-field": "~23.2.4",
|
|
50
50
|
"lit": "^2.0.0",
|
|
51
51
|
"sinon": "^13.0.2"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "d6cb1fbaaf436635de6854653b8b205065e15688"
|
|
54
54
|
}
|
|
@@ -88,6 +88,7 @@ export const PositionMixin = (superClass) =>
|
|
|
88
88
|
constructor() {
|
|
89
89
|
super();
|
|
90
90
|
|
|
91
|
+
this.__onScroll = this.__onScroll.bind(this);
|
|
91
92
|
this._updatePosition = this._updatePosition.bind(this);
|
|
92
93
|
}
|
|
93
94
|
|
|
@@ -112,7 +113,7 @@ export const PositionMixin = (superClass) =>
|
|
|
112
113
|
|
|
113
114
|
this.__positionTargetAncestorRootNodes = getAncestorRootNodes(this.positionTarget);
|
|
114
115
|
this.__positionTargetAncestorRootNodes.forEach((node) => {
|
|
115
|
-
node.addEventListener('scroll', this.
|
|
116
|
+
node.addEventListener('scroll', this.__onScroll, true);
|
|
116
117
|
});
|
|
117
118
|
}
|
|
118
119
|
|
|
@@ -122,7 +123,7 @@ export const PositionMixin = (superClass) =>
|
|
|
122
123
|
|
|
123
124
|
if (this.__positionTargetAncestorRootNodes) {
|
|
124
125
|
this.__positionTargetAncestorRootNodes.forEach((node) => {
|
|
125
|
-
node.removeEventListener('scroll', this.
|
|
126
|
+
node.removeEventListener('scroll', this.__onScroll, true);
|
|
126
127
|
});
|
|
127
128
|
this.__positionTargetAncestorRootNodes = null;
|
|
128
129
|
}
|
|
@@ -160,6 +161,14 @@ export const PositionMixin = (superClass) =>
|
|
|
160
161
|
this._updatePosition();
|
|
161
162
|
}
|
|
162
163
|
|
|
164
|
+
/** @private */
|
|
165
|
+
__onScroll(e) {
|
|
166
|
+
// If the scroll event occurred inside the overlay, ignore it.
|
|
167
|
+
if (!this.contains(e.target)) {
|
|
168
|
+
this._updatePosition();
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
163
172
|
_updatePosition() {
|
|
164
173
|
if (!this.positionTarget || !this.opened) {
|
|
165
174
|
return;
|