-
Notifications
You must be signed in to change notification settings - Fork 167
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
wrong Tab Titles using History #19868
Comments
This has maybe the same root issue as #14255. |
Please use the latest 24.4.x version - 24.4.1 is like 10 bug fix versions behind. |
@knoobie This issue still appears in Vaadin verison 24.4.10. |
@knoobie I knew I forgot to mention some details. You can use branch |
It looks like it has something to do with the React router.
@DarioViva42 (Salü Dario) |
@simasch Hey Simon 👋 This also seems to fix it on my end. However, there is a weird lag, between the update of the document and the update of the tab-title. This lag only exists for history items that are navigated to for the first time. After that (by going forward again) the tab-title updates the same time. Clearly visible at the end of the video. Screen.Recording.2024-09-09.at.18.38.32.movWhat are the side effect of disabling react? (liebsti griess us basel ins seeland) |
Had a look at this and it seems the title update is done before the navigation is finished when using the react-router. |
Update the page title after navigation has ended to not have the wrong title in history. Fixes #19868
Update the page title after navigation has ended to not have the wrong title in history. Fixes #19868
Update the page title after navigation has ended to not have the wrong title in history. Fixes #19868
Update the page title after navigation has ended to not have the wrong title in history. Fixes #19868 Co-authored-by: caalador <[email protected]>
* fix: update title after navigation (#20047) Update the page title after navigation has ended to not have the wrong title in history. Fixes #19868 * fix test mock --------- Co-authored-by: caalador <[email protected]> Co-authored-by: Mikael Grankvist <[email protected]>
This ticket/PR has been released with Vaadin 24.5.0.beta4 and is also targeting the upcoming stable 24.5.0 version. |
This ticket/PR has been released with Vaadin 24.4.13. |
Tested with version 24.4.13 in Chrome and unfortunately the issue still occurs. |
Description of the bug
When I switch views I expect the title in the browser tab to reflect this change.
In my demo application (a simple vaadin application created with vaadin-start) I have two views. The
empty
view and theHello World
view.Now, I can switch between these views and the title always changes to the correct name, representing the view that is currently displayed. But when using the history by navigating back the title is no longer correct it now always lags one view “behind”.
Weirdly this bug only appears in chromium based browsers (chrome, edge, vivaldi, …) but it works in other browsers (firefox, safari)
Also this bug was not present in Vaadin 24.3.17. But since 24.4.1 I get this weird behaviour.
Here is an overview of where I get the buggy behaviour.
I can somehow not build the project using 24.4.0,
com.vaadin:flow-server:jar:24.4.0.rc2
is blocked on our network, but only for this specific version?!Expected behavior
I expect the handling of tab titles to work in all browsers, also chrome using the newest Vaadin version.
Minimal reproducible example
https://github.com/DarioViva42/vaadinHistoryBug
On the
main
branch the project uses 24.4 and on the branch calledworking
the project uses 24.3.Because in 24.4 the
frontend
folder was moved (#18898), this project has twofrontend
folders to work with 24.3 and 24.4 (I did not copy all styles from one folder to the other, so styling will look a little wonky under 24.3 but the relevant part for this issue can still be demonstrated)Versions
The text was updated successfully, but these errors were encountered: