Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent duplicate warn up when opening same tooltip twice #8135

Merged
merged 5 commits into from
Nov 12, 2024

Conversation

web-padawan
Copy link
Member

Description

Follow-up to #8131

This fixes another edge-case when reusing the same vaadin-tooltip instance and calling open() twice: currently, warm up is scheduled twice with two setTimeout() calls and only the second one is stored in a variable (and then canceled).

From now on we check if there is an ongoing warm up timeout and if so, do not schedule another one unnecessarily.

Type of change

  • Bugfix

@sissbruecker sissbruecker merged commit d5df9f5 into main Nov 12, 2024
9 checks passed
@sissbruecker sissbruecker deleted the fix/tooltip-avoid-duplicate-warmup branch November 12, 2024 15:48
vaadin-bot pushed a commit that referenced this pull request Nov 12, 2024
* fix: prevent duplicate warn up when opening same tooltip twice

* test: reset global state in afterEach to make tests reliable

* fix: also clear timeout references when resetting global state

* test: change the tooltip opened check back to false

* refactor: simplify tooltip warm up condition logic
vaadin-bot pushed a commit that referenced this pull request Nov 12, 2024
* fix: prevent duplicate warn up when opening same tooltip twice

* test: reset global state in afterEach to make tests reliable

* fix: also clear timeout references when resetting global state

* test: change the tooltip opened check back to false

* refactor: simplify tooltip warm up condition logic
web-padawan added a commit that referenced this pull request Nov 12, 2024
web-padawan added a commit that referenced this pull request Nov 12, 2024
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.6.0.alpha4 and is also targeting the upcoming stable 24.6.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants