react / react/react-native

[0.76] `KeyboardAvoidingView` animation issues since 0.76+ upgrade

未关闭
#47,625 25 条评论 13 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

API: Keyboard Component: KeyboardAvoidingView Impact: Regression Issue: Author Provided Repro Needs: Attention Newer Patch Available
主要语言
C++
星标
127k
派生
25.3k
平均合并
1 天 23 小时
30 天内合并 PR
4

描述

Description

I've updated my project from 0.75.2 to 0.76.1 this morning, and I noticed that the KeyboardAvoidingView, which was previously animating properly, is no longer animating. It now jumps and doesn't follow the keyboard animation.

Not sure why in my project it doesn't work, but while creating the reproduction repo, I noticed the animation behaviour has changed and doesn't look native smooth anymore.

Steps to reproduce

Any new project with KeyboardAvoidingView

React Native Version

0.76.1

Affected Platforms

Runtime - iOS

Output of npx react-native info
System:
  OS: macOS 15.2
  CPU: (10) arm64 Apple M1 Pro
  Memory: 157.52 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.11.0
    path: ~/.nvm/versions/node/v22.11.0/bin/node
  Yarn:
    version: 1.22.17
    path: ~/.npm-global/bin/yarn
  npm:
    version: 10.9.0
    path: ~/.nvm/versions/node/v22.11.0/bin/npm
  Watchman:
    version: 2024.01.22.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/Alexis/.rbenv/shims/pod
Stacktrace or Logs
No crash
Reproducer

https://github.com/alexmngn/reproducer-react-native-keyboard-avoiding

Screenshots and Videos
On my project

Before update, 0.75.2

https://github.com/user-attachments/assets/5089cd4d-fb2f-4bde-9a9b-a7790b989c23

After update, 0.76.1

https://github.com/user-attachments/assets/60bc6d95-c444-4492-887b-cdb7d4e562d1

On the reproducer repo

Before update, 0.75.2

https://github.com/user-attachments/assets/83df6cab-b4c4-4698-a458-291ab37f982c

After update, 0.76.1

https://github.com/user-attachments/assets/8fa6d39c-88af-4527-b41c-d7ae2bc8e7a2

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从链接的复现仓库开始,在 iOS 上运行其中的 KeyboardAvoidingView 示例,对比 React Native 0.75.2 和 0.76.1。跟踪 KeyboardAvoidingView 在这两个版本中的行为,并根据所附的前后视频验证结果。升级后该 view 再次平滑地跟随键盘动画,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
react-native
领域
mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。