scrollTo without animation breaks sticky headers in ScrollView

Description

Reanimated 2 scrollTo function breaks sticky headers (ignores that they are there), when animation paramater is set to false.

  scrollTo(ref, 0, 900, true); // respects sticky headers

  scrollTo(ref, 0, 900, false);  // ignores sticky headers

Screenshots

image

upon using scrollTo:

image

Notice that the sticky header has not remained there.

Steps To Reproduce

  1. Press “scrollTo” to see expected behaviour
  2. Press the “reanimated scrollTo” button to see the actual behaviour

Expected behavior

Sticky headers should be sticky.

Actual behavior

Sticky headers are ignored.

Snack or minimal code example

https://snack.expo.io/CpjxOeeol

This also happens in “^2.0.0-rc.3” without expo also, you can copy the snack code into a minimal react native project.

Package versions

1 possible answer(s) on “scrollTo without animation breaks sticky headers in ScrollView