Skip to content

[Android] Consecutive animated "scrollTo" skip animation #26323

@kornfleks

Description

@kornfleks

This bug happens with ScrollView and FlatList; perhaps everything using ScrollResponder. When using scrollTo (scrollToOffset / scrollToIndex ..) with animated: true during the animation of another scrollTo the first animation is stopped and the next animation is skipped (despite the fact that it is scrolling to the right offset, but without animation).

React Native version:

System:
    OS: Windows 10
    CPU: (4) x64 Intel(R) Core(TM) i5-7600K CPU @ 3.80GHz
    Memory: 7.99 GB / 15.94 GB
  Binaries:
    Node: 11.14.0 - D:\Program Files\node.EXE
    npm: 6.7.0 - D:\Program Files\npm.CMD
react-native: 0.60.5

Steps To Reproduce

  1. Call scrollTo (with animated: true) from a ref of a ScrollView / FlatList
  2. Call scrollTo (with animated: true) again from the same ref during the previous animation

Describe what you expected to happen:

Previous animation has to be reused by the next animation and none of the next animation has to be skipped.
If you have a stock Android, you can try the scrollbar of the application list from the default launcher. It jump smoothly from row to row (when using the alphabetic scrollBar) without animation cuts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    API: AnimatedBugPlatform: AndroidAndroid applications.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions