Skip to content

[fix] useResponderEvents: negotiate from a common ancestor with no responder ancestors - #2917

Open
Pduhard wants to merge 2 commits into
necolas:masterfrom
Pduhard:fix-responder-lowest-common-ancestor
Open

Pduhard wants to merge 2 commits into
necolas:masterfrom
Pduhard:fix-responder-lowest-common-ancestor

Conversation

@Pduhard

@Pduhard Pduhard commented Oct 20, 2026 •

Copy link
Copy Markdown

Fix #2916

getLowestCommonAncestor read the first pair twice, so it never compared the last one. When that was the only common ancestor, it returned null and no negotiation happened. It now advances the index before reading.

Test: Negotiation › negotiate from first common ancestor when it has no responder ancestors. It fails without the fix. Its neighbour, negotiate from first common ancestor when there are siblings, passes only because a grandParent is connected to the responder system.

A second touch starting on the sibling goes through the same path. The test uses a mouse move, as in the issue.

format, flow, lint and unit pass. The fix also applies as is to 0.22-dev.

Written with Claude Code; I reviewed the code and the tests.

@codesandbox-ci

codesandbox-ci Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c8a0f4f:

Sandbox Source
react-native-web-examples Configuration

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Pduhard Pduhard changed the title [fix] useResponderEvents: find the common ancestor when it is the outermost responder node [fix] useResponderEvents: negotiate from a common ancestor with no responder ancestors Oct 20, 2026

This branch has not been deployed

No deployments
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.

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

1 participant