Skip to content

Fix Android nested gesture ownership - #35863

Merged
kubaflo merged 3 commits into
dotnet:inflight/currentfrom
AdamEssenmacher:fix-issue7814-child-gesture
Jun 30, 2026
Merged

kubaflo merged 3 commits into
dotnet:inflight/currentfrom
AdamEssenmacher:fix-issue7814-child-gesture

Conversation

@AdamEssenmacher

Copy link
Copy Markdown
Contributor

Description of Change

This change fixes an Android gesture ownership regression introduced by the Issue7814 parent-scroll handoff behavior.

MauiRecyclerView now tracks when descendant content has requested touch ownership through Android’s RequestDisallowInterceptTouchEvent(true) contract. When a perpendicular gesture crosses touch slop, the recycler view still allows the Issue7814 parent handoff when no child has claimed the touch stream, but it no longer cancels the child path and forwards the gesture to the parent after descendant content has claimed ownership.

A regression test was added for a horizontal CarouselView containing a vertical CollectionView with a native-backed touch-claiming row. The test verifies that a horizontal drag across the claiming row completes with Up instead of Cancel, and that the parent CarouselView position does not change.

Issues Fixed

Fixes #35862

@github-actions github-actions Bot added area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/android labels Jun 10, 2026
@AdamEssenmacher
AdamEssenmacher force-pushed the fix-issue7814-child-gesture branch from e4ae78c to 49aa398 Compare June 11, 2026 19:30
@kubaflo

kubaflo commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

/review -b feature/enhanced-reviewer

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Jun 11, 2026

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expert Review — 1 findings

See inline comments for details.

touchViewRect.Left + 20,
touchViewRect.Top + (touchViewRect.Height / 2));

var touchStatusAfterGesture = App.FindElement(TouchStatusLabelId).GetText();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[moderate] UI Test Reliability — This test reads the touch status and parent position immediately after the drag completes. Unlike the companion release test, it does not use RetryAssert, so Android/Appium timing can make the accessibility text or carousel position stale: a valid Up may not be observable yet, or a delayed parent handoff could be missed. Wrap the post-drag status/position assertions in App.RetryAssert so the test reliably verifies the final gesture state.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in ace6c96. I moved the post-drag reads and assertions into a single App.RetryAssert so the test waits for the settled state before checking both the Up status and the unchanged parent position together.

@MauiBot MauiBot added s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Jun 11, 2026
MauiBot

This comment was marked as outdated.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Jun 11, 2026
@kubaflo

kubaflo commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

/review -b feature/enhanced-reviewer -p android

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Jun 11, 2026
MauiBot

This comment was marked as outdated.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Jun 12, 2026

@kubaflo kubaflo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please check the ai's suggestions?

@kubaflo

kubaflo commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

/review -b feature/enhanced-reviewer -p android

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Jun 13, 2026

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expert Review — 1 findings

See inline comments for details.

MauiBot

This comment was marked as outdated.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Jun 13, 2026
@AdamEssenmacher
AdamEssenmacher force-pushed the fix-issue7814-child-gesture branch from 49aa398 to eaad81e Compare June 14, 2026 18:57
@kubaflo

kubaflo commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

/review -b feature/enhanced-reviewer -p android

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Jun 14, 2026
@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Jun 14, 2026
@kubaflo

kubaflo commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

/review -b feature/enhanced-reviewer -p android

@kubaflo
kubaflo force-pushed the inflight/current branch from 81295ab to 34a8f02 Compare June 25, 2026 20:02
@kubaflo
kubaflo changed the base branch from inflight/current to main June 30, 2026 20:38
@kubaflo
kubaflo force-pushed the fix-issue7814-child-gesture branch from ace6c96 to d10da54 Compare June 30, 2026 22:15
@kubaflo
kubaflo changed the base branch from main to inflight/current June 30, 2026 22:15
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 35863

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 35863"

@kubaflo
kubaflo merged commit 072a19d into dotnet:inflight/current Jun 30, 2026
3 of 4 checks passed
@github-actions github-actions Bot added this to the .NET 10 SR9 milestone Jun 30, 2026
kubaflo added a commit that referenced this pull request Jul 3, 2026
### Description of Change

This change fixes an Android gesture ownership regression introduced by
the Issue7814 parent-scroll handoff behavior.

`MauiRecyclerView` now tracks when descendant content has requested
touch ownership through Android’s
`RequestDisallowInterceptTouchEvent(true)` contract. When a
perpendicular gesture crosses touch slop, the recycler view still allows
the Issue7814 parent handoff when no child has claimed the touch stream,
but it no longer cancels the child path and forwards the gesture to the
parent after descendant content has claimed ownership.

A regression test was added for a horizontal `CarouselView` containing a
vertical `CollectionView` with a native-backed touch-claiming row. The
test verifies that a horizontal drag across the claiming row completes
with `Up` instead of `Cancel`, and that the parent `CarouselView`
position does not change.

### Issues Fixed

Fixes #35862

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
@kubaflo kubaflo mentioned this pull request Jul 6, 2026
kubaflo added a commit that referenced this pull request Jul 6, 2026
### Description of Change

This change fixes an Android gesture ownership regression introduced by
the Issue7814 parent-scroll handoff behavior.

`MauiRecyclerView` now tracks when descendant content has requested
touch ownership through Android’s
`RequestDisallowInterceptTouchEvent(true)` contract. When a
perpendicular gesture crosses touch slop, the recycler view still allows
the Issue7814 parent handoff when no child has claimed the touch stream,
but it no longer cancels the child path and forwards the gesture to the
parent after descendant content has claimed ownership.

A regression test was added for a horizontal `CarouselView` containing a
vertical `CollectionView` with a native-backed touch-claiming row. The
test verifies that a horizontal drag across the claiming row completes
with `Up` instead of `Cancel`, and that the parent `CarouselView`
position does not change.

### Issues Fixed

Fixes #35862

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
PureWeen pushed a commit that referenced this pull request Jul 7, 2026
### Description of Change

This change fixes an Android gesture ownership regression introduced by
the Issue7814 parent-scroll handoff behavior.

`MauiRecyclerView` now tracks when descendant content has requested
touch ownership through Android’s
`RequestDisallowInterceptTouchEvent(true)` contract. When a
perpendicular gesture crosses touch slop, the recycler view still allows
the Issue7814 parent handoff when no child has claimed the touch stream,
but it no longer cancels the child path and forwards the gesture to the
parent after descendant content has claimed ownership.

A regression test was added for a horizontal `CarouselView` containing a
vertical `CollectionView` with a native-backed touch-claiming row. The
test verifies that a horizontal drag across the claiming row completes
with `Up` instead of `Cancel`, and that the parent `CarouselView`
position does not change.

### Issues Fixed

Fixes #35862

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
PureWeen pushed a commit that referenced this pull request Jul 7, 2026
### Description of Change

This change fixes an Android gesture ownership regression introduced by
the Issue7814 parent-scroll handoff behavior.

`MauiRecyclerView` now tracks when descendant content has requested
touch ownership through Android’s
`RequestDisallowInterceptTouchEvent(true)` contract. When a
perpendicular gesture crosses touch slop, the recycler view still allows
the Issue7814 parent handoff when no child has claimed the touch stream,
but it no longer cancels the child path and forwards the gesture to the
parent after descendant content has claimed ownership.

A regression test was added for a horizontal `CarouselView` containing a
vertical `CollectionView` with a native-backed touch-claiming row. The
test verifies that a horizontal drag across the claiming row completes
with `Up` instead of `Cancel`, and that the parent `CarouselView`
position does not change.

### Issues Fixed

Fixes #35862

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Jul 10, 2026
### Description of Change

This change fixes an Android gesture ownership regression introduced by
the Issue7814 parent-scroll handoff behavior.

`MauiRecyclerView` now tracks when descendant content has requested
touch ownership through Android’s
`RequestDisallowInterceptTouchEvent(true)` contract. When a
perpendicular gesture crosses touch slop, the recycler view still allows
the Issue7814 parent handoff when no child has claimed the touch stream,
but it no longer cancels the child path and forwards the gesture to the
parent after descendant content has claimed ownership.

A regression test was added for a horizontal `CarouselView` containing a
vertical `CollectionView` with a native-backed touch-claiming row. The
test verifies that a horizontal drag across the claiming row completes
with `Up` instead of `Cancel`, and that the parent `CarouselView`
position does not change.

### Issues Fixed

Fixes #35862

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Jul 15, 2026
### Description of Change

This change fixes an Android gesture ownership regression introduced by
the Issue7814 parent-scroll handoff behavior.

`MauiRecyclerView` now tracks when descendant content has requested
touch ownership through Android’s
`RequestDisallowInterceptTouchEvent(true)` contract. When a
perpendicular gesture crosses touch slop, the recycler view still allows
the Issue7814 parent handoff when no child has claimed the touch stream,
but it no longer cancels the child path and forwards the gesture to the
parent after descendant content has claimed ownership.

A regression test was added for a horizontal `CarouselView` containing a
vertical `CollectionView` with a native-backed touch-claiming row. The
test verifies that a horizontal drag across the claiming row completes
with `Up` instead of `Cancel`, and that the parent `CarouselView`
position does not change.

### Issues Fixed

Fixes #35862

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Jul 22, 2026
### Description of Change

This change fixes an Android gesture ownership regression introduced by
the Issue7814 parent-scroll handoff behavior.

`MauiRecyclerView` now tracks when descendant content has requested
touch ownership through Android’s
`RequestDisallowInterceptTouchEvent(true)` contract. When a
perpendicular gesture crosses touch slop, the recycler view still allows
the Issue7814 parent handoff when no child has claimed the touch stream,
but it no longer cancels the child path and forwards the gesture to the
parent after descendant content has claimed ownership.

A regression test was added for a horizontal `CarouselView` containing a
vertical `CollectionView` with a native-backed touch-claiming row. The
test verifies that a horizontal drag across the claiming row completes
with `Up` instead of `Cancel`, and that the parent `CarouselView`
position does not change.

### Issues Fixed

Fixes #35862

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Jul 28, 2026
### Description of Change

This change fixes an Android gesture ownership regression introduced by
the Issue7814 parent-scroll handoff behavior.

`MauiRecyclerView` now tracks when descendant content has requested
touch ownership through Android’s
`RequestDisallowInterceptTouchEvent(true)` contract. When a
perpendicular gesture crosses touch slop, the recycler view still allows
the Issue7814 parent handoff when no child has claimed the touch stream,
but it no longer cancels the child path and forwards the gesture to the
parent after descendant content has claimed ownership.

A regression test was added for a horizontal `CarouselView` containing a
vertical `CollectionView` with a native-backed touch-claiming row. The
test verifies that a horizontal drag across the claiming row completes
with `Up` instead of `Cancel`, and that the parent `CarouselView`
position does not change.

### Issues Fixed

Fixes #35862

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Jul 29, 2026
### Description of Change

This change fixes an Android gesture ownership regression introduced by
the Issue7814 parent-scroll handoff behavior.

`MauiRecyclerView` now tracks when descendant content has requested
touch ownership through Android’s
`RequestDisallowInterceptTouchEvent(true)` contract. When a
perpendicular gesture crosses touch slop, the recycler view still allows
the Issue7814 parent handoff when no child has claimed the touch stream,
but it no longer cancels the child path and forwards the gesture to the
parent after descendant content has claimed ownership.

A regression test was added for a horizontal `CarouselView` containing a
vertical `CollectionView` with a native-backed touch-claiming row. The
test verifies that a horizontal drag across the claiming row completes
with `Up` instead of `Cancel`, and that the parent `CarouselView`
position does not change.

### Issues Fixed

Fixes #35862

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 31, 2026
@github-actions github-actions Bot modified the milestones: .NET 10 SR9, .NET 10 SR10 Aug 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/android s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants