-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
Comments
Hi there. |
onOpenChange={(_open) => { |
So previous code does not work for me, instead I found another way, which is patching So the line is modified from:
To:
That solves the problem for me. As an additional note I tested the dialog alone and the issue does not happen, only happens with the drawer, I guess it must be a combination of Thanks! |
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. AnoBodyStyles={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
The text was updated successfully, but these errors were encountered: