material-components / material-components/material-components-android

[BottomSheetBehavior] Scroll in webview do not working properly

Open
#1,293 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug Widget: BottomSheet
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

**Description:**
I have a container view with a webview that have a scroll inside html page. This container have the bottomSheetBehavior. So, when i scroll down in the webview and i try to scroll to top, instead of scroll, i drag the page cause bottomSheetBehavior.
**Expected behavior:**
If i scroll down in webview then i scroll to top, and when im on top of page, then i drag the page, like a normal behavior in a non webview page.
**Solutions that i try:**
1. If i make nestedScrollingEnabled=true on webview, the scroll works properly, but i can drag the page only on dragging on toolbar,
2. If i put a nestedScrollView on parent to the webview, the scroll works properly, i can drag the page like expected behavior, but the webview page dont working properly because i have some buttons that goes to another part of the page that dont work. And if i goes to another page inside the same webview, the scroll still in the same position instead of goes to top of page.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the interaction between BottomSheetBehavior and the WebView's internal HTML scrolling, then compare the nestedScrollingEnabled and parent NestedScrollView configurations described in the issue. Done means scrolling reaches the top of the WebView before dragging the bottom sheet, while in-page buttons and navigation still work and new pages reset their scroll position.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, html, java
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.