Open TamirCode opened 4 months ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
e
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Description
React Carousel bug It seems to me that on every state change, onInit is triggered, and then the scroll position jumps to somewhere on the page The scroll remains if you click the change state button when u are at the very bottom of the page or the very top of the page. The useEffect correctly runs once. Maybe something to do with prevScrollPosition in detail instance.
Steps to reproduce
when I click the button it hijacks my scroll position and this makes using other states impossible https://codesandbox.io/p/sandbox/lightbox-carousel-bug-rj3tnq App.tsx
Carousel.tsx
styles.css
Environment
Additional context
Unrelated side note - there is also the bug which the carousel flashes open and closes fullscreen when the page mounts. I have temporary work around for it (not in the sandbox) but its also bad