-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[🐞] <Link scroll={false}... to same path still scrolls #6411
Comments
@JerryWu1234 Link updated in the original post. Apologies, I'm not too familiar with Stackblitz |
I can only see that in your stackblitz @williamsdyyz |
Append /link-scroll to the address in the preview pane. The share link I created already had that. But I guess not. ¯_(ツ)_/¯ |
thanks @williamsdyyz So the purpose of the For navigating normally, it doesn't remember the scroll positions, only for going back in history. Maybe this should be documented better? |
@shairez Interesting. False assumption on my part. That prop is not documented at all. In that case, the issue changes somewhat. For the use-case of showing a modal dialog that can be closed with the back button (similar to Android UX), there is no way to stop the navigation to the dialog from scrolling the underlying document to top. I've added an example to the link-scroll page: scroll down, click "Open dialog". The dialog appears but the document scrolls to top which is undesirable. The back button nicely closes the dialog and the scroll position is restored to where it should ideally have been all along. I guess this is really a feature request, not a bug. Is there any existing way to achieve what I need? |
Which component is affected?
Qwik Runtime
Describe the bug
I'm trying to show dialog boxes based on a search param like
<Link href="./?dialog=about" scroll={false}>About us</Link>
I need the scroll position of the document to stay put when the user clicks the link. Unfortunately scroll={false} isn't doing that.
Reproduction
https://stackblitz.com/edit/qwik-starter-wvympk?file=src%2Froutes%2Flink-scroll%2Findex.tsx
Steps to reproduce
System Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: