Skip to content

Go to hash (Not actually a quasar bug but easy to fix) #17379

@13uraksahin

Description

@13uraksahin

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions