maxs15 / maxs15/react-native-modalbox
Closing a modal before animation completes does not cancel onOpened
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.9k
- Forks
- 496
- PR merge metrics
- No merged PRs in 30d
Description
### Steps to Reproduce
1. Create Modal object with methods for onClosed & onOpened
2. Open modal and immediately tap to dismiss before open animation completes
### Expected Behavior
The onOpened then onClosed method runs. If it's intentional that the onOpened method is not called till animation done, then cancel the onOpened call if modal is closed before animation completes.
### Actual Behavior
The onClosed method runs immediately and after the onOpened method calls. This creates issues if your state depends on Opened being called before Closed.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name a file or test; start by tracing the modal's open and dismiss animation callback flow. Reproduce an immediate dismissal and verify that onClosed does not run before onOpened, or that onOpened is cancelled when the modal closes before the opening animation completes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100