Skip to content

Commit 0f9691b

Browse files
committed
cleanup
1 parent 2ccbd6a commit 0f9691b

3 files changed

Lines changed: 4 additions & 16 deletions

File tree

packages/rn-tester/RNTester/NativeExampleViews/RNTNativeTouchReceiverComponentView.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@
1313
NS_ASSUME_NONNULL_BEGIN
1414

1515
/**
16-
* Fabric component view whose touchesEnded: fires onNativeTouch.
17-
* Used as the parent wrapper in the blockNativeResponder repro:
18-
* <RNTNativeTouchReceiver onNativeTouch={...}>
19-
* <Pressable blockNativeResponder={true} ...>...</Pressable>
20-
* </RNTNativeTouchReceiver>
16+
* Fabric component view that receives native touch events and emits onNativeTouch.
2117
*/
2218
@interface RNTNativeTouchReceiverComponentView : RCTViewComponentView
2319
@end

packages/rn-tester/RNTester/NativeExampleViews/RNTNativeTouchReceiverComponentView.mm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ - (instancetype)initWithFrame:(CGRect)frame
3838
}
3939

4040
/**
41-
* touchesEnded: fires when UIKit delivers the touch-up event through the
42-
* native responder chain. Even when a Pressable child is the JS responder,
43-
* this still fires because RCTSurfaceTouchHandler sets cancelsTouchesInView=NO.
44-
* That is the bug this component helps reproduce.
41+
* Emits onNativeTouch when UIKit delivers the touch-up event.
4542
*/
4643
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
4744
{

packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/component/RNTNativeTouchReceiverView.kt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,8 @@ import com.facebook.react.uimanager.events.Event
1717
import com.facebook.react.views.view.ReactViewGroup
1818

1919
/**
20-
* A native ViewGroup that fires onNativeTouch via onInterceptTouchEvent.
21-
*
22-
* This simulates a native parent that receives touch events through Android's touch dispatch.
23-
* When blockNativeResponder=false on a Pressable child, requestDisallowInterceptTouchEvent is NOT
24-
* called, so onInterceptTouchEvent fires and onNativeTouch is dispatched. When
25-
* blockNativeResponder=true, requestDisallowInterceptTouchEvent(true) is called on this view,
26-
* suppressing onInterceptTouchEvent — and thus onNativeTouch — for that gesture.
20+
* Native ViewGroup that receives touch events through Android's touch dispatch
21+
* and emits onNativeTouch.
2722
*/
2823
internal class RNTNativeTouchReceiverView(context: ThemedReactContext) : ReactViewGroup(context) {
2924

0 commit comments

Comments
 (0)