Skip to content

Legacy URL fragment lost after navigation #123

@javier-godoy

Description

@javier-godoy

MPR (Vaadin 23.3.6/7.7.38) with MprNavigatorRoute. Chrome 111.

There are two legacy views. After navigation from http://127.0.0.1:8080/#!view1 to http://127.0.0.1:8080/#!view2, the target URL is visible for a split second, then the URL reverts to http://127.0.0.1:8080/

mpr

@Route("")
public class MyNavigatorRoute extends MprNavigatorRoute {
    @Override
    public void configureNavigator(Navigator navigator) {
      navigator.addView("view1", View1.class);
      navigator.addView("view2", View2.class);
    }
}


public class View1 extends VerticalLayout implements View {

  @Override
  public void enter(ViewChangeEvent event) {}
  
  public View1() {
    setCaption("View 1");
    addComponent(new Button("Navigate", ev -> {
      getUI().getNavigator().navigateTo("view2");
    }));
  }
  
}

public class View2 extends VerticalLayout implements View {

  @Override
  public void enter(ViewChangeEvent event) {}
  
  public View2() {
    setCaption("View 2");
  }
  
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions