fix(ios): fix Images consuming gestures - #4277
Open
fractalbeauty wants to merge 1 commit into
Open
Conversation
fractalbeauty
requested a deployment
to
CI with Mapbox Tokens
August 6, 2026 16:59 — with
GitHub Actions
Waiting
fractalbeauty
requested a deployment
to
CI with Mapbox Tokens
August 6, 2026 16:59 — with
GitHub Actions
Waiting
fractalbeauty
requested a deployment
to
CI with Mapbox Tokens
August 6, 2026 16:59 — with
GitHub Actions
Waiting
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
Fixes
<Images>sometimes consuming gestures on iOS by ignoring hit-testing on RNMBXImages. This prevented gestures from reaching the map (pan/zoom/rotate gestures did not start) or markers (press events did not fire). As far as I can tell, children of<Images>never need to be interactable (they're used for rendering reusable marker images), so this is correct.We found this bug in our app which uses v10.2.10 and the old architecture. We use ShapeSource/SymbolLayer with an Images component which has React Native views as its children (not fixed image assets).
The root cause was confirmed by listening to all gestures in the native code and logging the hit-tested views. Successful gestures showed MapView -> RNMBXMapView -> RCTView. Failed gestures showed RNMBXImage -> RNMBXImages -> RNMBXMapView -> RCTView. This didn't happen all the time (some gestures worked), but I'm not sure what the trigger was.
I tried to reproduce this in the example app but wasn't able to. My guesses are:
Checklist
CONTRIBUTING.mdyarn generatein the root folder/exampleapp./example)