Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix nested pressable's event propagation. (#2981)
### Issue: `Test case`: `3` nested pressables `Actions`: `click`, `press for <500ms`, `press for >500ms` `Expected behaviour`: No propagation `Observed behaviour`: Propagation for `500ms` (until long press activates), then no propagation. ### Cause: Touch and non-active events disregard component's layer, only state respecting component's level is `ACTIVE`. ### Solution: Create a component which activates immediately after pressing `Pressable`, capture that event and use it for state setting and callback calling. ### Important: This PR also performs a lot of de-cluttering work in the `utils.ts` file. This is necessary due to the convoluted nature of the handled problem, it was especially important to me in this PR to be dealing with clearly labelled functions. closes: #2980
- Loading branch information