[V2] Back Link problem

Scenario:

  1. I have Page 1 with a link to Page 2
  2. Page 2 contains a link to Page 2 also.

When going from Page 1 to Page 2, then click the Back link in Page 2 and it can back to Page 1.

But if going from Page 1 to Page 2 and clicked on the Page 2 link in Page 2, the Back link doesn’t work anymore.

Any idea why the Back link is not working ? It seems this problem only occur when Page 2 with route async function.

Update: Not only Back link doesn’t work, view.router.navigate also not working

Just did a test and found it’s related to the route with async, you can simulate the problem by:

  1. In console, use view.router.navigate to a page with async function
  2. Do the same view.router.navigate to the page again

Then you will not able to use the Back link nor view.router.navigate

Please help, Thanks a lot

after do a little debug and found that the second call to load the same page (with async function) altered router.allowPageChange to false and cause the problem.

Should add a line to line#5999 in framework7.js to reset the allowPageChange flag

router.allowPageChange = true;

Made a pull request and hope this can be fixed asap