aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTatu Lund <tatu@vaadin.com>2019-01-11 13:22:10 +0200
committerSun Zhe <31067185+ZheSun88@users.noreply.github.com>2019-01-22 16:05:19 +0200
commitf1d1c50fa26c7f51af9d3e28f0afe8558511f9b6 (patch)
tree3f8257aad2134f761cb7981820219644f971860c
parent78fd7fcbd2ee344609d0bd28b439b45ee23435cb (diff)
downloadvaadin-framework-f1d1c50fa26c7f51af9d3e28f0afe8558511f9b6.tar.gz
vaadin-framework-f1d1c50fa26c7f51af9d3e28f0afe8558511f9b6.zip
Fix @PushStateNavigation with @PreserveOnRefresh (#11417)
Navigation needs to be done also in doRefresh(..) in similar fashion as in doInit(..) Fixes https://github.com/vaadin/framework/issues/11416
-rw-r--r--server/src/main/java/com/vaadin/ui/UI.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/ui/UI.java b/server/src/main/java/com/vaadin/ui/UI.java
index cf9aee4e1a..682e1f38f2 100644
--- a/server/src/main/java/com/vaadin/ui/UI.java
+++ b/server/src/main/java/com/vaadin/ui/UI.java
@@ -869,6 +869,13 @@ public abstract class UI extends AbstractSingleComponentContainer
page.updateLocation(newLocation.toString(), true, false);
page.updateBrowserWindowSize(newWidth, newHeight, true);
+
+ // Navigate if there is navigator, this is needed in case of
+ // PushStateNavigation
+ Navigator navigator = getNavigator();
+ if (navigator != null) {
+ navigator.navigateTo(navigator.getState());
+ }
}
/**