material-components / material-components/material-components-android
[BottomSheetBehavior] Nested scrolling child view does not scroll when its inside nested scrolling parent
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Description:** When a nested scrolling child view is inside a nested scrolling parent view and the child view changes the scroll position, the touch events get intercepted by the bottom sheet behavior. For example, if I put a ViewPager2 in the bottom sheet dialog and put a vertically scrollable RecyclerView inside the ViewPager2, and navigate to the second page, the RecyclerView becomes unscrollable.
**Expected behavior:** Nested scrolling child view must be scrollable and should not be intercepted by bottom sheet behavior.
**Minimal sample app repro:** https://github.com/UdaraWanasinghe/bottom-sheet-nested-scrolling-test
**Android API version:** All affected.
**Material Library version:** 1.8.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked minimal sample app and reproduce the issue using a ViewPager2 containing a vertically scrollable RecyclerView inside a bottom sheet. Then trace BottomSheetBehavior's handling of nested scrolling and touch interception; done means the RecyclerView remains scrollable after navigating to the second page on the affected Material Library version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100