qwik
qwik copied to clipboard
[🐞] Same page navigation reloads the page instead of navigating to the id
Which component is affected?
Qwik Runtime
Describe the bug
I am doing a simple same site navigation using the a tag, where I want to navigate to another part in the same route where the id is specified in the a tag. I am using the a tag as you would normally do:
<a href="#aboutus">About Us</a>
And I want to navigate to the section named about us for example, normally I would expect a smooth scrolling to the section, but it reloads the page instead and then it goes to that section.
Video of the issue
https://user-images.githubusercontent.com/105229933/236712895-4c7adfe4-5b82-4f37-97b7-08768426cb5b.mov
Reproduction
Repo Link: https://github.com/Armandotrsg/Seifen Link of the webpage: https://seifen.vercel.app/#conocenos
Steps to reproduce
Run npm install
followed by npm run dev
to start the site and click on any navigation link a the navbar, an see how it refreshes the page and then it navigates to the id.
System Info
System:
OS: macOS 13.3.1
CPU: (8) arm64 Apple M2
Memory: 134.25 MB / 8.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.14.2 - /usr/local/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 9.5.0 - /usr/local/bin/npm
Browsers:
Chrome: 112.0.5615.137
Edge: 113.0.1774.35
Safari: 16.4
npmPackages:
@builder.io/qwik: 1.0.0 => 1.0.0
@builder.io/qwik-city: ^1.0.0 => 1.0.0
undici: 5.22.0 => 5.22.0
vite: 4.3.3 => 4.3.3
Additional Information
No response