Skip to content

ASTableNode - broken automaticallyAdjustsContentOffset - not working during scrolling #2080

Open
@patryk-sredzinski

Description

@patryk-sredzinski

◽️When it happens:

Always, 100% reproducible

◽️Current Behavior:

If there is a scrolling animation, inserting rows before visible content still shifts the whole tableview. Works properly only when tableview is stoped.

◽️Expected Behavior:

If user is scrolling, or there is a scrolling animation the tableview contentOffset should have the content offset shifted properly when there are insertions above.

◽️Steps To Reproduce:

Sample code showing the issue:
https://gist.github.com/patryk-sredzinski/832008c265bff1d99e29dd22da844ecd

  1. Put this code in any Xcode project, setup this 'TestController' to launch
  2. Tapping on the button at the bottom 'Add Elements on Top' will insert 50 elements at sections 0-49
  3. Observe behavior working properly when there is no scrolling animation
  4. Swipe to begin scrolling
  5. Tap on 'Add Elements on Top' to insert new elements on top
  6. Observe content offset shifts.

◽️Environment:

iOS: 16.4.1
Texutre: 3.1.0

◽️Current result:

Short GIF:

Full video:
https://www.youtube.com/shorts/0KfDXZTsVWI

◽️Observations

I think this can be related to UITableView. Changing contentOffset there during scrolling seems to be ignored.
UICollectionView seems to allow changing contentOffset during scrolling, but ASCollectionNode does not have this flag.

Do you have any good solution to get this working properly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions