Skip to content

Calendar not scrolling to top, if contentInset top not 0 #1318

Description

@NataliaTs

version: 8.0.3

Description

If calendar contentInset.top != 0, it is not scrolled to top

Steps To Reproduce

Change contentInset top value.
Initially contentOffset of calendar is correct, after scrolling calendar can't be scrolled to top.
In scrollViewWillEndDragging method setTargetContentOffset(0) is called and prevent further scrolling.
If contentInset.top != 0, minimum contentOffset may be negative value, so setting it to 0 is wrong.

Expected Behavior

Calendar can be scrolled to top.

Additional Context

Locally I fixed this bug with patch by changing code in JTACScrollViewDelegates from this:
if theCurrentContentOffset <= 0 { setTargetContentOffset(0); return }
to this:
if theCurrentContentOffset <= -scrollView.contentInset.top { setTargetContentOffset(-scrollView.contentInset.top); return }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions