@vaadin/tooltip 25.3.3 → 25.3.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/tooltip",
3
- "version": "25.3.3",
3
+ "version": "25.3.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -35,20 +35,20 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
- "@vaadin/a11y-base": "~25.3.3",
39
- "@vaadin/component-base": "~25.3.3",
40
- "@vaadin/markdown": "~25.3.3",
41
- "@vaadin/overlay": "~25.3.3",
42
- "@vaadin/popover": "~25.3.3",
43
- "@vaadin/vaadin-themable-mixin": "~25.3.3",
38
+ "@vaadin/a11y-base": "~25.3.4",
39
+ "@vaadin/component-base": "~25.3.4",
40
+ "@vaadin/markdown": "~25.3.4",
41
+ "@vaadin/overlay": "~25.3.4",
42
+ "@vaadin/popover": "~25.3.4",
43
+ "@vaadin/vaadin-themable-mixin": "~25.3.4",
44
44
  "lit": "^3.0.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@vaadin/aura": "~25.3.3",
48
- "@vaadin/chai-plugins": "~25.3.3",
49
- "@vaadin/test-runner-commands": "~25.3.3",
47
+ "@vaadin/aura": "~25.3.4",
48
+ "@vaadin/chai-plugins": "~25.3.4",
49
+ "@vaadin/test-runner-commands": "~25.3.4",
50
50
  "@vaadin/testing-helpers": "^2.0.0",
51
- "@vaadin/vaadin-lumo-styles": "~25.3.3",
51
+ "@vaadin/vaadin-lumo-styles": "~25.3.4",
52
52
  "sinon": "^22.0.0"
53
53
  },
54
54
  "customElements": "custom-elements.json",
@@ -56,5 +56,5 @@
56
56
  "web-types.json",
57
57
  "web-types.lit.json"
58
58
  ],
59
- "gitHead": "9ce328ba54b283838ec9049d7351e4bbf96cba77"
59
+ "gitHead": "10d0b4f1accc697ccc701265159d8f9314bf9851"
60
60
  }
@@ -20,6 +20,8 @@ const closing = new Set();
20
20
 
21
21
  let warmedUp = false;
22
22
  let warmUpTimeout = null;
23
+ /** The tooltip that opens when the warm up timeout ends. */
24
+ let warmUpTooltip = null;
23
25
  let cooldownTimeout = null;
24
26
 
25
27
  /**
@@ -32,6 +34,7 @@ export function resetGlobalTooltipState() {
32
34
  clearTimeout(warmUpTimeout);
33
35
  clearTimeout(cooldownTimeout);
34
36
  warmUpTimeout = null;
37
+ warmUpTooltip = null;
35
38
  cooldownTimeout = null;
36
39
  closing.clear();
37
40
  }
@@ -144,8 +147,9 @@ class TooltipStateController {
144
147
  if (warmedUp) {
145
148
  // Warmed up, show the tooltip.
146
149
  this.__showTooltip();
147
- } else if (warmUpTimeout == null) {
148
- // Ensure there is no duplicate warm up.
150
+ } else if (warmUpTimeout == null || !warmUpTooltip.isConnected) {
151
+ // Ensure there is no duplicate warm up, unless its tooltip was removed.
152
+ this.__abortWarmUp();
149
153
  this.__scheduleWarmUp(isFocus);
150
154
  }
151
155
  }
@@ -177,6 +181,7 @@ class TooltipStateController {
177
181
  if (warmUpTimeout) {
178
182
  clearTimeout(warmUpTimeout);
179
183
  warmUpTimeout = null;
184
+ warmUpTooltip = null;
180
185
  }
181
186
  }
182
187
 
@@ -206,10 +211,14 @@ class TooltipStateController {
206
211
  /** @private */
207
212
  __scheduleWarmUp(isFocus) {
208
213
  const delay = isFocus ? this.focusDelay : this.hoverDelay;
214
+ warmUpTooltip = this.host;
209
215
  warmUpTimeout = setTimeout(() => {
210
216
  warmUpTimeout = null;
211
- warmedUp = true;
212
- this.__showTooltip();
217
+ warmUpTooltip = null;
218
+ // Do not open a tooltip that was removed while waiting.
219
+ if (this.host.isConnected) {
220
+ this.__showTooltip();
221
+ }
213
222
  }, delay);
214
223
  }
215
224
  }
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/tooltip",
4
- "version": "25.3.3",
4
+ "version": "25.3.4",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/tooltip",
4
- "version": "25.3.3",
4
+ "version": "25.3.4",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {