This prevents pull-to-refresh from being triggered when (potentially) nested scrolling within an element on the page that is using overflow-y: scroll or overflow-y: auto. To address this, the following item were added:
On every touch start, check if the target element or any of its parent elements are scrollable. If any are scrollable, notify the TurboWebView that the currently touched element is scrollable.
On every touch end, reset the internal state of the TurboWebView.
Whenever the TurboSwipeRefreshLayout checks to see if its scrollable child can scroll up, check the state of the TurboWebView if a scrollable element is currently being touched.
This fixes: https://github.com/hotwired/turbo-android/issues/294
This prevents pull-to-refresh from being triggered when (potentially) nested scrolling within an element on the page that is using
overflow-y: scroll
oroverflow-y: auto
. To address this, the following item were added:TurboWebView
that the currently touched element is scrollable.TurboWebView
.TurboSwipeRefreshLayout
checks to see if its scrollable child can scroll up, check the state of theTurboWebView
if a scrollable element is currently being touched.