emilkowalski / vaul

An unstyled drawer component for React.
https://vaul.emilkowal.ski
MIT License
5.29k stars 170 forks source link

Issues when used with @tanstack/react-vitrual #280

Open asobirov opened 4 months ago

asobirov commented 4 months ago

Seems like this issue is still present when used with @tanstack/react-virtual. Unfortunately, I don't have a repro currently, will try to make one when i can. I'm currently not sure what specifically causing this though, but it seems to work all good without the tanstack virtual

Originally posted in https://github.com/emilkowalski/vaul/issues/152#issuecomment-1960028978

asobirov commented 4 months ago

Couldn't replicate the exact behaviour, but if you try scrolling down a bit (seems like the items lower the initial 100vh) and click the drawer trigger then the drawer won't open - https://codesandbox.io/p/devbox/drawer-scrolls-to-top-forked-mx755p.

I pretty much put the code from tanstack window example into the #152's repro.

I think the scroll to the top issue also may occur if window + infinite scroll is used (rough guess, since that's what im using)

Originally posted by @asobirov in https://github.com/emilkowalski/vaul/issues/152#issuecomment-1960116479

asobirov commented 4 months ago

https://github.com/emilkowalski/vaul/issues/246 seems to have a common issue and may be related to this as well