react-native-reanimated icon indicating copy to clipboard operation
react-native-reanimated copied to clipboard

useAnimatedKeyboard frame delay results in choppy animation (iOS)

Open azcarraga opened this issue 2 years ago • 4 comments

Description

When using the keyboard height from useAnimatedKeyboard to animate another component, there is a frame delay that results in a laggy animation. At full speed, it looks like the animated component is delayed. With slow animations enabled on the sim, you can see the choppiness/jitter (video below). I've included a min repro snack as well that demonstrates the issue on device.

https://user-images.githubusercontent.com/47671189/236428820-7b16d440-080b-4837-885d-ef1e6f0274e8.mov

Steps to reproduce

  1. Open linked snack on device (iOS) and toggle the keyboard several times by tapping the text input / tapping "return"
  2. Observe the pink bar that tracks the keyboard - you can see how it lags in both directions instead of following the keyboard frame for frame

Expected: Pink bar should track the keyboard smoothly (frame by frame)

Snack or a link to a repository

https://snack.expo.dev/@aazcarraga/reanimated-useanimatedkeyboard-frame-delay-repro?platform=ios

Reanimated version

3.1.0

React Native version

0.69.5

Platforms

iOS

JavaScript runtime

Hermes

Workflow

Expo bare workflow

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

Real device

Device model

iPhone 14 Pro (iOS 16.4)

Acknowledgements

Yes

azcarraga avatar May 05 '23 10:05 azcarraga

Probably got fixed since we merged: https://github.com/software-mansion/react-native-reanimated/pull/5337 I'll assign myself to remember to test it later

Latropos avatar Nov 10 '23 12:11 Latropos

Probably got fixed since we merged: #5337 I'll assign myself to remember to test it later

This PR looks like only have android changes

But this issue is about iOS

kesha-antonov avatar Apr 05 '24 11:04 kesha-antonov

I'm seeing this too. Are there any updates?

aymather avatar Jun 29 '24 19:06 aymather

In the newest version of Reanimated it should works better

piaskowyk avatar Jul 01 '24 08:07 piaskowyk