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}>
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}>
https://github.com/user-attachments/assets/83b53847-708e-49d7-bf54-539955c9f05d