If a NavigationButton has no target, but sets the view in the click listener instead, using the button twice (click-back-click) will cause the NavigationManager to navigate past the view to an empty view.
Apparently this occurs when the view set in the click listener is the 'nextView' on the client-side, and is set by a NB again; NB placeholder animation occurs, but then NM navigates (animates) again.
To reproduce, place in NavigationManager, then 1. click 2. go back 3. click again:
new NavigationButton("No target, click listener");
c.addClickListener(new NavigationButtonClickListener() {
@Override
public void buttonClick(NavigationButtonClickEvent event) {
manager.navigateTo(random);
}
});
Originally by @emarc
If a NavigationButton has no target, but sets the view in the click listener instead, using the button twice (click-back-click) will cause the NavigationManager to navigate past the view to an empty view.
Apparently this occurs when the view set in the click listener is the 'nextView' on the client-side, and is set by a NB again; NB placeholder animation occurs, but then NM navigates (animates) again.
To reproduce, place in NavigationManager, then 1. click 2. go back 3. click again:
Imported from https://dev.vaadin.com/ issue #14210