eclipsesource / eclipsesource/tabris-js

Provide overscroll flag in scroll event

Open
#1,799 2 comments 0 reactions 0 assignees View on GitHub
android api feature ios js
Dominant language
JavaScript
Stars
1.4k
Forks
171
PR merge metrics
No merged PRs in 30d

Description

### Problem description

`ScrollView` and `CollectionView` overscroll on iOS when pulling content beyond the min/max scroll position and bounce-back when letting go. Overscroll and bounce-back behaviors often need to be ignored when applying a translation dependent on `"scroll"` events.

It is possible to check whether a `"scroll"` event has been fired during overscroll by accumulating scroll deltas and comparing accumulated value with max/min possible offset. However, this is not very convenient, since calculating the max offset requires calculating the overall width/height of the scrollable content as well.

### Expected behavior

Provide a boolean property in the `"scroll"` event, which indicates whether this event has been fired during overscroll.

### Environment

- Tabris.js version: 3.x

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.