react-native
react-native copied to clipboard
showSoftInputOnFocus prop in TextInput is not working in iOS New Architecture
Description
As per doc, showSoftInputOnFocus
when false
, it should prevent the soft keyboard from showing when the field is focused.
For iOS in New Architecture this is not getting respected and keyboard is getting popped up everytime.
In iOS Old Architecture it's working as expected.
In Android both new and old architecture it's working as expected.
Steps to reproduce
- Clone the reproducer repo provided.
- Run the iOS with New Architecture enabled.
- Click on TextInput with
showSoftInputOnFocus
flag set tofalse
. - It will open keyboard. (Ideally it should not)
React Native Version
0.74.3
Affected Platforms
Runtime - iOS
Areas
Fabric - The New Renderer
Output of npx react-native info
System:
OS: macOS 13.6.2
CPU: (12) arm64 Apple M2 Pro
Memory: 86.86 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 16.15.1
path: ~/.nvm/versions/node/v16.15.1/bin/node
Yarn:
version: 3.6.4
path: ~/.nvm/versions/node/v16.15.1/bin/yarn
npm:
version: 8.11.0
path: ~/.nvm/versions/node/v16.15.1/bin/npm
Watchman:
version: 2024.05.02.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.0
- iOS 17.0
- macOS 14.0
- tvOS 17.0
- watchOS 10.0
Android SDK: Not Found
IDEs:
Android Studio: Giraffe 2022.3.1 Patch 4 Giraffe 2022.3.1 Patch 4
Xcode:
version: 15.0/15A240d
path: /usr/bin/xcodebuild
Languages:
Java:
version: 1.8.0_292
path: /Users/shubhamgupta/.sdkman/candidates/java/current/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Stacktrace or Logs
No logs
Reproducer
https://github.com/shubhamguptadream11/react-native-showSoftInputOnFocus-ios-issue-newarch
Screenshots and Videos
https://github.com/facebook/react-native/assets/85783070/baf61be9-5263-4f6d-ac02-13ad675e3841