[0.76.5] Modal glitchy behavior on iOS #48245
Labels
Component: Modal
Issue: Author Provided Repro
This issue can be reproduced in Snack or an attached project.
Platform: iOS
iOS applications.
Resolution: PR Submitted
A pull request with a fix has been provided.
Description
My issue is closely related to #47694. Initially I didn't see 2nd modal at all (in 0.76.3), but after updating to 0.76.5 at least 2nd Modal started appearing.
But what I noticed is that hiding animation shows artifacts of the previous render of a Modal if I render conditionally.
Possible "fix\hack" that I found for now is to render both Modals, but to control
visibility
property. This of course is a sub-optimal solution since no one wants to render all Modals.Please check my videos and reproduction repository.
Steps to reproduce
ModalContent.tsx
Possible fix:
This will force rendering of
both
components, but visibility will be controlled byvisibility
property of theModal
.2. Run iOS
3. Try opening/hiding Modal
4. Verify it hides/show properly without issues.
React Native Version
0.76.5
Affected Platforms
Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/vsheyanov/react-76-4-modal-bug/tree/main
Screenshots and Videos
2nd and 3rd - during
closing
animation you can see that it shows the previous statemodal-ui-bug.mp4
modal-ui-bug-normal.mp4
The text was updated successfully, but these errors were encountered: