Skip to content

[useResponderEvents] A move onto a sibling of the responder never asks their parent #2916

Open

Description

@Pduhard

Is there an existing issue for this?

  • I have searched the existing issues

Describe the issue

A parent PanResponder is never asked to take a mouse drag that goes from one child responder onto a sibling child responder. A drag that stays on the first child does ask it.

It only happens when the parent is the outermost view with responder props.

Expected behavior

The parent is asked, as when the drag stays on the first child.

Steps to reproduce

react-native-web 0.21.4, Chrome.

<View {...panResponder.panHandlers}>
  <View onStartShouldSetResponder={() => true} /> {/* A */}
  <View onStartShouldSetResponder={() => true} /> {/* B */}
</View>

Press on A, drag onto B: onMoveShouldSetPanResponder is never called.

Test case

https://github.com/Pduhard/repro-rnw-responder-lca

Additional comments

getLowestCommonAncestor (useResponderEvents/utils.js) reads the first pair twice (pathA[indexA++]), so it never compares the last one. Here the last one is the only common ancestor, so it returns null and nobody is asked:

getLowestCommonAncestor([1, 0], [2, 0]) // null, expected 0

Fix in #2917.

Activity

  1. zoontek commented on Oct 20, 2026

    @zoontek
    Collaborator

    @Pduhard Do you have a video / repro to show the issue?

  2. Pduhard commented on Oct 20, 2026

    @Pduhard
    Author

    @zoontek sure !

    Screencast.from.2026-10-20.11-36-42.mp4

    and you can run it here https://stackblitz.com/github/Pduhard/repro-rnw-responder-lca?startScript=dev

    Repro fixed: parent took the gesture over A, so a hand drag hid the bug. Now it takes only drags longer than A. Logs name the view under the pointer

    Steps: press middle of A, drag slowly past B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions