framework7io / framework7

Full featured HTML framework for building iOS & Android apps
http://framework7.io
MIT License
18.06k stars 3.23k forks source link

reload get wrong page with browser history somecase #4121

Closed yoyo930021 closed 1 year ago

yoyo930021 commented 1 year ago

Describe the bug

A clear and concise description of what the bug is.

When browserHistorySeparator or browserHistoryRoot startWiths url, the initial url get wrong url. In some route reload, user will redirect to / path.

To Reproduce

Steps to reproduce the behavior:

  1. open browserHistory and set browserHistoryRoot to /a.
  2. add a route with path start with /a. Ex: /about
  3. open /about page and reload it.

PS. If you use my CodeSandbox, you just need to go to about page and reload it.

Expected behavior

stay in /about page

Actual Behavior

Go to / page

Screenshots

If applicable, add screenshots to help explain your problem.

https://user-images.githubusercontent.com/9126398/211283325-7be6dd52-b563-451a-b795-3b62fd2b0ef3.mov

Additional context

Add any other context about the problem here.