Add go to hash support to default scrollBehavior #17380
Unanswered
13uraksahin
asked this question in
Ideas / Proposals
Replies: 1 comment
-
That's what feature requests for in the discussion section. Edit: migrated the issue to discussions |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What happened?
Go to hash/id does not work on Quasar created Vue projects.
What did you expect to happen?
Should work out of the box.
Reproduction URL
https://stackblitz.com/edit/quasarframework-2fwwrg
How to reproduce?
go to src/router/index and find:
scrollBehavior: (to) => ({ left: 0, top: 0 })
change with this:
scrollBehavior: (to) => ({ left: 0, top: 0, el: to.hash || undefined })
to make it work out of the box, quasar can create project with this addition or with better solution.
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Project Creation (create-quasar), SPA Mode
Platforms/Browsers
No response
Quasar info output
No response
Relevant log output
No response
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions