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

automaticallyAdjustKeyboardInsets Does Not adjust Insets When Keyboard Disappears again #47731

Open
MaxTheTurtle0 opened this issue Nov 19, 2024 · 0 comments
Labels
API: Keyboard Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)

Comments

@MaxTheTurtle0
Copy link

MaxTheTurtle0 commented Nov 19, 2024

Description

When using automaticallyAdjustKeyboardInsets={true} in the new architecture, the insets are not adjusted properly. Initially, the content is pushed above the keyboard if needed when it first appears, but the insets are not removed when the keyboard disappears. This leads to the ScrollView being permanently misaligned.

Steps to reproduce

  1. Clone the repository and cd into ReproducerApp
  2. Install dependencies with bun i
  3. cd into ios/ folder and install pods with fabric enabled RCT_NEW_ARCH_ENABLED=1 pod install (you can install with or without fabric enabled to compare behaviors)
  4. cd .. and run bun ios

React Native Version

0.76.2

Affected Platforms

Runtime - iOS

Areas

Fabric - The New Renderer

Output of npx react-native info

(node:54260) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
System:
  OS: macOS 15.1
  CPU: (8) arm64 Apple M1 Pro
  Memory: 751.11 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: Not Found
  npm:
    version: 10.9.0
    path: ~/.nvm/versions/node/v22.11.0/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.15.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.0
      - iOS 18.0
      - macOS 15.0
      - tvOS 18.0
      - visionOS 2.0
      - watchOS 11.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.15989.150.2411.11948838
  Xcode:
    version: 16.0/16A242d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.11
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.2
    wanted: 0.76.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

.

Reproducer

https://github.com/MaxTheTurtle0/adjustKeyboardInset-newArch

Screenshots and Videos

New Arch (with Bug - keyboard insets don't get adjusted again when it disappears)

Simulator.Screen.Recording.-.iPhone.15.-.2024-11-19.at.21.10.07.mp4

Without New Arch (everything works fine - the keyboard insets get adjusted again when it disappears)

Simulator.Screen.Recording.-.iPhone.15.-.2024-11-19.at.21.30.36.mp4
@MaxTheTurtle0 MaxTheTurtle0 added Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API: Keyboard Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)
Projects
None yet
Development

No branches or pull requests

2 participants