Skip to content

fix: defer setting defaults until tooltip.ts is loaded - #5724

Merged
vursen merged 6 commits into
mainfrom
fix/tooltip-configuration
Nov 16, 2023
Merged

vursen merged 6 commits into
mainfrom
fix/tooltip-configuration

Conversation

@vursen

@vursen vursen commented Nov 15, 2023 •

Copy link
Copy Markdown
Contributor

Description

It turns out that TooltipConfiguration didn't always work in production mode. The implementation didn't take into account that tooltip.ts can be loaded later than executeJs from the UIInitListener are executed. This resulted in "Cannot read properties of undefined" JS errors, which in turn prevented tooltip defaults from being set on a page refresh. However, we didn't see these errors because Flow didn't log JS errors in production until 24.3. Also, the tests didn't catch that because they always set the defaults again after a page refresh, which left no chance for the issue to manifest.

In this PR, I updated TooltipConfiguration to defer setting defaults for tooltips until tooltip.ts is loaded in the browser.

A follow-up to vaadin/flow#18016

Type of change

  • Bugfix

@vursen
vursen requested a review from tomivirkki November 15, 2023 15:13
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 24.3.0.alpha5 and is also targeting the upcoming stable 24.3.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