You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Regression] Unexpected order of JavaScript execution in prod mode #18016
We have a TooltipConfiguration that registers a UIInitListener to run some JavaScript that ensures the default global configuration for tooltips. This JavaScript assumes that the @JsModule dependencies, particularly tooltip.ts, are imported in the browser before its execution.
However, in version 24.3, this no longer works consistently. In dev mode, everything still works as expected. In prod mode, the Flow client starts executing UIInitListener's JavaScript before the @JsModule dependencies become available, which then results in an "undefined method" error on the client-side.
Expected behavior
The executeJS instructions scheduled in UIInitListener should be executed only after the @JsModule dependencies are imported in the browser.
Minimal reproducible example
git checkout bug/ui-init-listener in flow-components.
Run mvn clean install -Drelease -DskipTests
Run mvn jetty:run -Drun-it -Drelease -f vaadin-button-flow-parent/vaadin-button-flow-integration-tests
Open http://localhost:8080/vaadin-button/tooltip-defaults and reload to get UIInitListener invoked.
changed the title [-]Incorrect order of JavaScript execution in prod mode[/-][+][Regression] Incorrect order of JavaScript execution in prod mode[/+]on Nov 10, 2023
changed the title [-][Regression] Incorrect order of JavaScript execution in prod mode[/-][+][Regression] Unexpected order of JavaScript execution in prod mode[/+]on Nov 15, 2023
Activity
[-]Incorrect order of JavaScript execution in prod mode[/-][+][Regression] Incorrect order of JavaScript execution in prod mode[/+][-][Regression] Incorrect order of JavaScript execution in prod mode[/-][+][Regression] Unexpected order of JavaScript execution in prod mode[/+]mshabarov commentedon Nov 16, 2023
Covered by changes in Tooltip configuration initialisation via vaadin/flow-components#5724.