Skip to content

automaticallyAdjustKeyboardInsets Does Not adjust Insets When Keyboard Disappears again #47731

Description

@MaxTheTurtle0

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    API: KeyboardResolution: FixedA PR that fixes this issue has been merged.Type: New ArchitectureIssues and PRs related to new architecture (Fabric/Turbo Modules)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions