Skip to content

Conversation

@j-piasecki
Copy link
Member

Description

Prevents NativeDetector from reacting to events that happen on its surface but not on any of its children. This should match the behavior from the V2 API, and feels more like an "expected" result.

This doesn't affect the web since display: contents there isn't subject to our hacks and the detector doesn't create a box. The behavior after this PR should be consistent across the platforms.

Since codegen is not perfect, to put it lightly, I had to redeclare pointerEvents in the spec and handle the setter on Android. The only base class that does it automatically is ReactViewManager, but we need to create a ViewGroup to accept children.

Test plan

- Android iOS
Before
Screen.Recording.2025-11-19.at.10.24.27.mov
Screen.Recording.2025-11-19.at.10.45.17.mov
After
Screen.Recording.2025-11-19.at.10.23.09.mov
Screen.Recording.2025-11-19.at.10.44.18.mov

@j-piasecki j-piasecki merged commit 8b43cf5 into next Nov 20, 2025
5 checks passed
@j-piasecki j-piasecki deleted the @jpiasecki/dont-handle-events-on-detector-surface branch November 20, 2025 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants