8000 fix(scrollBehavior): trigger scroll behavior if same route with hash by ryanklarhoelter · Pull Request #3592 · vuejs/vue-router · GitHub
[go: up one dir, main page]

Skip to content

fix(scrollBehavior): trigger scroll behavior if same route with hash #3592

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

Merged
merged 3 commits into from
Oct 8, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(scrollBehavior): trigger scroll behavior if same route
close #1668, #974
  • Loading branch information
Ryan Klarhölter committed Jul 12, 2021
commit 860b007b108da67d5af4d0ddc8d0606ca87b937f
2 changes: 2 additions & 0 deletions src/history/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
isNavigationFailure,
NavigationFailureType
} from '../util/errors'
import { handleScroll } from '../util/scroll'

export class History {
router: Router
Expand Down Expand Up @@ -161,6 +162,7 @@ export class History {
route.matched[lastRouteIndex] === current.matched[lastCurrentIndex]
) {
this.ensureURL()
handleScroll(this.router, current, route, false)
return abort(createNavigationDuplicatedError(current, route))
}

Expand Down
0