reactjs / react-transition-group

An easy way to perform animations when a React component enters or leaves the DOM
https://reactcommunity.org/react-transition-group/
Other
10.17k stars 650 forks source link

Transition triggers twice in iOS 13 and macOS Safari 13 #631

Open philipnery opened 4 years ago

philipnery commented 4 years ago

https://codesandbox.io/s/flamboyant-hill-ikufl

Changing the page in iOS 13 would trigger the animation twice. This doesn't affect iOS 12.

I hope this could be investigated.

Thanks!


EDIT: Sometimes it also inconsistently happens in Safari 13

silvenon commented 4 years ago

Thanks for providing a demo, I’ll take a look over the weekend.

immohitrathi commented 4 years ago

We're also facing similar issue on ios 13.4.1 where the bottomsheet opens up then quickly closes and open up again

simcha90 commented 4 years ago

I had same issue on ios, the issue was that timeout of setTimeout in my function that finishes animation and update css classes, was called before css animation was finished, so I'd just increased this interval

immohitrathi commented 4 years ago

Yes i also fixed it by changing timeout value