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

KeyboardAvodingView implemented with useAnimatedKeyboard doesn't work after 3.0.0-rc.10 #4324

Closed
terrysahaidak opened this issue Apr 3, 2023 · 7 comments
Labels
Needs review Issue is ready to be reviewed by a maintainer Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snippet of code, snack or repo is provided

Comments

@terrysahaidak
Copy link
Contributor

terrysahaidak commented Apr 3, 2023

Description

After upgrading to the latest Reanimated version (for my tests i used the latest commit as for today 2d3016b8dcc482f51422c144eef58bf4657b7792) and my custom implementation of KeyboardAvoidingView doesn't always work.

Here you can see that the log inside of useAnimatedStyle is reporting changes for the keyboard.height, but the actual change is not applied to the view until i click somewhere. The same happens when i call Keyboard.dismiss().

If was working in 3.0.0-rc.10.

But when the scroll view by dragging dismissing the keyboard it actually animates the height.

2023-04-03.17.06.13.mov

Steps to reproduce

  1. Click on the input
  2. Click somewhere in the screen for the styles to update
  3. Click on dismiss
  4. Click somewhere to apply the styles
  5. Do it again but now drag the scroll view

Snack or a link to a repository

https://github.com/terrysahaidak/UseAnimatedKeyboardBug1

Reanimated version

3.0.2 and 2d3016b8dcc482f51422c144eef58bf4657b7792 commit

React Native version

0.71.5

Platforms

iOS

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

iOS simulator

Device model

No response

Acknowledgements

Yes

@terrysahaidak terrysahaidak added the Needs review Issue is ready to be reviewed by a maintainer label Apr 3, 2023
@github-actions github-actions bot added Repro provided A reproduction with a snippet of code, snack or repo is provided Platform: iOS This issue is specific to iOS labels Apr 3, 2023
@tomekzaw
Copy link
Member

tomekzaw commented Apr 4, 2023

Hey @terrysahaidak, thanks for opening this issue, we will take care of this.

@tomekzaw
Copy link
Member

tomekzaw commented Apr 5, 2023

@terrysahaidak Thanks again for reporting the issue and providing a helpful reproducer.

I believe this issue has been fixed with #4266 and #4329 which was merged recently.

It looks like the problem you have mentioned does no longer occur on 2fe3e38. Here's a video recording:

it.works.mp4

Watching the video in slow motion, there's still 1-2 frames of delay but this is a separate issue and we're actively working on it, so I'm closing this issue. Thanks again!

@terrysahaidak
Copy link
Contributor Author

Nice! Thanks a lot! Any ETA for the new Reanimated release?

@tomekzaw
Copy link
Member

tomekzaw commented Apr 5, 2023

@terrysahaidak Not decided yet but probably next week

@hirbod
Copy link
Contributor

hirbod commented Apr 10, 2023

Ah dang it, just stumbled across this issue. But glad it has been fixed. I haven't checked the PRs yet, but is this also going to be backported for REA2?

@tomekzaw
Copy link
Member

@hirbod we're planning to drop support for 2.x soon, do you need this backported to v2?

@hirbod
Copy link
Contributor

hirbod commented Apr 10, 2023

We're still not able to upgrade to v3 in our project. It would be convenient, since I have the same issue on v2 but if your schedule is tight, I would instead use https://github.com/kirillzyusko/react-native-keyboard-controller which I have used in the past (before there was useAnimatedKeyboard) which does the same as useAnimatedKeyboard and a bit more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs review Issue is ready to be reviewed by a maintainer Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snippet of code, snack or repo is provided
Projects
None yet
Development

No branches or pull requests

3 participants