We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using with vue-router, scrolling to an element via URL hash does not work:
const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), routes: setupLayouts([ { path: "/", name: "Home", component: Home, }, { path: "/foo", name: "Foo", component: Home, }, ]), scrollBehavior(to, from, savedPosition) { if (to.hash) { return { el: to.hash, }; } if (savedPosition) { return savedPosition; } return { top: 0 }; }, });
The console error is:
[Vue Router warn]: Couldn't find element using selector "#p0" returned by scrollBehavior.
Removing setupLayouts fixes the issue.
setupLayouts
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When using with vue-router, scrolling to an element via URL hash does not work:
The console error is:
Removing
setupLayouts
fixes the issue.The text was updated successfully, but these errors were encountered: