Skip to content

Commit

Permalink
Fix @PushStateNavigation with @PreserveOnRefresh (#11417)
Browse files Browse the repository at this point in the history
Navigation needs to be done also in doRefresh(..) in similar fashion as in doInit(..)

Fixes #11416
  • Loading branch information
TatuLund authored and ZheSun88 committed Jan 22, 2019
1 parent 78fd7fc commit f1d1c50
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/src/main/java/com/vaadin/ui/UI.java
Expand Up @@ -869,6 +869,13 @@ public void doRefresh(VaadinRequest request) {

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());
}
}

/**
Expand Down

0 comments on commit f1d1c50

Please sign in to comment.