-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Use the function abort() to prevent history.back() more than twice,then history.back() can't go last page. #1031
Labels
Comments
Hi, please make sure to follow the Issue Reporting Guidelines before opening an issue. Thanks! |
Seems to be the same issue of which was addressed by #894. Though it's not fixed for 0.7 |
thank you , can you fix it? |
is there anybody to fix this? |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
version: "vue-router": "^0.7.13","vue": "^1.0.28"
browser history: index -> list-> detail->buy
buy.vue:
<a @click="back">back</a>
back:()=>history.back()
I confirm user when click the back button
i do this in router because i want prevent the browser's back button too
router.beforeEach(({to, from, next, abort}) => {
let confirm = window.confirm('are you sure to leave this page?')
if(confirm){
abort()
}else{
next()
}
})
I click the back button first time, and abort,do it again.
then i click it the third time,do next,it go index but not detail...
The text was updated successfully, but these errors were encountered: