New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
History path lost on Safari while using router.base on nuxt.config.js #2638
Comments
I met the same problem, wish for the solution urgently; |
Router base is incorrect. It should ends with a slash: |
@pi0 I have two nuxt.js project with different configure, another one using |
node_modules\nuxt\lib\app\router.js, in this file, find "createRouter" function, delete "scrollBehavior ," , and restart, and then the problem is resolved. |
@pi0 Yes, I have the same problem. It is caused by This problem is found in the IOS system. When My site is Click the first tab to Then click your back button, it will go to |
@llpw4 Thanks. It works for me. I want to know the reason. |
I meet the same problem. Did you solve it? |
@ZooTopiaGG Just try to delete |
I met the same problem, wish for the solution urgently; |
I have same problem. |
I come out a workaround mounted(){
// 解决ios丢失上一级url问题
window.history.replaceState(null, null, `${this.$router.options.base}${this.$route.fullPath}`.replace(/\/\//g, '/'));
} this works fo me |
@llpw4 me too |
@luanwulin it must added in every page, so terrible... |
me too~~ |
@hqqxxf you may add this in default.vue |
@luanwulin can you tell me why it(replaceState) works? |
@hqqxxf sorry, i dont know either |
Fixed with vuejs/vue-router#2295 / vue-router 3.0.2 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Here are steps and requirements to reproduce:
nuxt-starter-kit
templatea.vue
inpages
directory, add<nuxt-link to="/b">To Page B</nuxt-link>
in templateb.vue
inpages
directory, add any text into templateActual result: It return to "http://your-host:your-port/abc"
Excepted result: Should return to last page "http://your-host:your-port/abc/a"
The text was updated successfully, but these errors were encountered: