Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
NataliaTs opened this issue Apr 12, 2021 · 1 comment
Open

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

NataliaTs opened this issue Apr 12, 2021 · 1 comment

Comments

@NataliaTs
Copy link

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 }

@patchthecode
Copy link
Owner

is it possible you can do a PR?
i can accept and patch it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants