Skip to content
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

Option to disable scrolling back to drawer trigger #512

Open
SimonVillage opened this issue Nov 19, 2024 · 0 comments
Open

Option to disable scrolling back to drawer trigger #512

SimonVillage opened this issue Nov 19, 2024 · 0 comments

Comments

@SimonVillage
Copy link

I have anchor links in my drawer which should scroll the page to a certain id / position.

On Safari the scroll does not happen if position: fixed !important! is applied to the body. A noBodyStyles={true} on the root fixes this problem but also changes the general behavior which I would like to avoid.

Another problem is that if the drawer is closed, the page will scroll back to the position where the trigger is. A preventScrollRestoration={true} does not solve the problem.

Here is an example with: <Drawer.Root preventScrollRestoration={true} noBodyStyles={true}>

Screen.Recording.2024-11-19.at.15.08.26.mov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant