[iOS] Activate buttons on pointer up#4129
Merged
j-piasecki merged 4 commits intomainfrom Apr 30, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts button activation semantics on iOS to dispatch ACTIVE on pointer-up (to match Android/Web), and updates JS-side button/touchable logic to work with the new state timing.
Changes:
- Moves v3
BaseButtoncleanup/press dispatching fromonDeactivatetoonFinalize. - Updates legacy touchable/button state handling to treat
BEGANas “active” and to trigger press-in onBEGAN. - Updates iOS
RNNativeViewGestureHandlerto emit anACTIVEupdate ontouchUpInsidebeforeEND.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/react-native-gesture-handler/src/v3/components/GestureButtons.tsx | Moves press/cleanup to onFinalize for v3 buttons. |
| packages/react-native-gesture-handler/src/components/touchables/GenericTouchable.tsx | Simplifies state transition trigger to always use State.BEGAN. |
| packages/react-native-gesture-handler/src/components/GestureButtons.tsx | Treats BEGAN as active for legacy button active-state tracking. |
| packages/react-native-gesture-handler/apple/Handlers/RNNativeViewHandler.mm | Emits an ACTIVE update on pointer-up-inside prior to END. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
m-bert
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Changes the moment the
ACTIVEevent is dispatched on iOS from pointer down to pointer up, aligning it with Android and Web implementations.Updates existing checks to account for this change.
Updates the v3 button implementation to do cleanup in
onFinalizeinstead ofonDeactivate- setup happens inonBegin, so there's no guarantee thatonDeactivatewill trigger.Test plan
Tested existing examples, including legacy ones