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

KeyboardAvoidingView do not keep input in view under Android 15 (target SDK 35) #49759

Open
dprevost-LMI opened this issue Mar 1, 2025 · 4 comments

Comments

@dprevost-LMI
Copy link
Contributor

dprevost-LMI commented Mar 1, 2025

Description

Under RN 0.77.1 and Android 15 with targetSdkVersion = 35, the KeyboardAvoidingView stopped working as expected.
In the video below, we can see that clicking on the input brings the keyboard and makes the input disappear under the keyboard. However, just using targetSdkVersion = 34 fixed the issue.

Something is problematic under Android 15 SDK 35 and the KeyboardAvoidingView component.

Steps to reproduce

  1. Create an RN 77 project npx @react-native-community/cli init Rn77App --version 0.77.1
  2. Use an input wrapped in a KeyboardAvoidingView under the scroll view of the example app
  3. Make sure to use targetSdkVersion = 35
  4. Click on the input
  5. The input disappears under the keyboard
  6. Expected: The input moves up and stays in view, like when using targetSdkVersion = 34 or under RN 76

React Native Version

0.77.1

Affected Platforms

Runtime - Android

Output of npx @react-native-community/cli info

System:
  OS: macOS 15.3
  CPU: (12) arm64 Apple M2 Pro
  Memory: 1.65 GB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.20.4
    path: ~/.nvm/versions/node/v18.20.4/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v18.20.4/bin/yarn
  npm:
    version: 10.7.0
    path: ~/.nvm/versions/node/v18.20.4/bin/npm
  Watchman:
    version: 2024.11.04.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/dprevost/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23726.103.2422.13016713
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.13
    path: /usr/bin/javac
  Ruby:
    version: 3.3.3
    path: /Users/dprevost/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.77.1
    wanted: 0.77.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

None

Reproducer

https://github.com/dprevost-LMI/Rn77App

Screenshots and Videos

The below are from a physical Pixel 9

Working case under RN 76 Non-working case under RN 77 and SDK 35
Screen.Recording.2025-03-01.at.9.38.34.AM.mov
Screen.Recording.2025-03-01.at.9.37.28.AM.mov
@dprevost-LMI dprevost-LMI changed the title KeyboardAvoidingView do not keep input in view under Android 15 (target SDK 35) KeyboardAvoidingView do not keep input in view under Android 15 (target SDK 35) Mar 1, 2025
@Acexhat
Copy link

Acexhat commented Mar 2, 2025

Facing same issue! Any solution or if anyone fixing it?

@JuEunSung
Copy link

facing same issue

@cortinico
Copy link
Contributor

cc @alanleedev Could you briefly look into this one?

@alanleedev
Copy link
Contributor

Sorry for the delayed update. I was able to repro the issue but didn't have much chance to look into it yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants