-
Notifications
You must be signed in to change notification settings - Fork 180
fix: prevent duplicated history entry with vaadin-router #21305
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
Conversation
When using legacy vaadin-router, browser history for client side navigation is updated by the router itself when navigation completes. However, in some situations the history gets updated also by the server side, causing two history entries for the same navigation and consequently a wrong behavior if pressing browser back button. This change: - Prevents updating history on the server side, unless the server is handling a postponed navigation for which vaadin-router does not update the history - Adds a test module for vaadin-router with the most common navigation tests - Re-enables several tests that are now passing, likely because previous changes fixed the related issues Fixes #21243 Fixes #19494 Fixes vaadin/hilla#335
Test Results1 214 files + 22 1 214 suites +22 1h 20m 27s ⏱️ + 1m 24s Results for commit 2479d3e. ± Comparison against base commit 4a2e749. This pull request removes 2 and adds 38 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
flow-server/src/main/java/com/vaadin/flow/router/internal/AbstractNavigationStateRenderer.java
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/router/internal/AbstractNavigationStateRenderer.java
Outdated
Show resolved
Hide resolved
|
When using legacy vaadin-router, browser history for client side navigation is updated by the router itself when navigation completes. However, in some situations the history gets updated also by the server side, causing two history entries for the same navigation and consequently a wrong behavior if pressing browser back button. This change: - Prevents updating history on the server side, unless the server is handling a postponed navigation for which vaadin-router does not update the history - Adds a test module for vaadin-router with the most common navigation tests - Re-enables several tests that are now passing, likely because previous changes fixed the related issues Fixes #21243 Fixes #19494 Fixes vaadin/hilla#335
…: 24.7) (#21319) * fix: prevent duplicated history entry with vaadin-router (#21305) When using legacy vaadin-router, browser history for client side navigation is updated by the router itself when navigation completes. However, in some situations the history gets updated also by the server side, causing two history entries for the same navigation and consequently a wrong behavior if pressing browser back button. This change: - Prevents updating history on the server side, unless the server is handling a postponed navigation for which vaadin-router does not update the history - Adds a test module for vaadin-router with the most common navigation tests - Re-enables several tests that are now passing, likely because previous changes fixed the related issues Fixes #21243 Fixes #19494 Fixes vaadin/hilla#335 * Fix module parent pom version --------- Co-authored-by: Marco Collovati <[email protected]>
When using legacy vaadin-router, browser history for client-side navigation is updated by the router itself when navigation completes. However, in some situations the history gets updated also by the server side, causing two history entries for the same navigation and consequently a wrong behavior if pressing the browser back button.
This change:
Fixes #21243
Fixes #19494
Fixes vaadin/hilla#335