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

showSoftInputOnFocus prop in TextInput is not working in iOS New Architecture #45297

Closed
shubhamguptadream11 opened this issue Jul 5, 2024 · 2 comments
Labels
Component: TextInput Related to the TextInput component. Platform: iOS iOS applications. Resolution: PR Submitted A pull request with a fix has been provided. Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)

Comments

@shubhamguptadream11
Copy link
Contributor

shubhamguptadream11 commented Jul 5, 2024

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

  1. Clone the reproducer repo provided.
  2. Run the iOS with New Architecture enabled.
  3. Click on TextInput with showSoftInputOnFocus flag set to false.
  4. 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

Simulator.Screen.Recording.-.iPhone.SE.3rd.generation.-.2024-07-05.at.14.42.52.mp4
@shubhamguptadream11 shubhamguptadream11 added Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) labels Jul 5, 2024
@github-actions github-actions bot added Component: TextInput Related to the TextInput component. Platform: iOS iOS applications. labels Jul 5, 2024
@shubhamguptadream11
Copy link
Contributor Author

shubhamguptadream11 commented Jul 6, 2024

@cortinico I am Shubham, I tried to fix this. Can you please look into this once.

@github-actions github-actions bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. and removed Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Jul 6, 2024
@cortinico cortinico added Resolution: PR Submitted A pull request with a fix has been provided. and removed Needs: Triage 🔍 Needs: Author Feedback labels Jul 8, 2024
@cortinico
Copy link
Contributor

@dmytrorykun is on it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: TextInput Related to the TextInput component. Platform: iOS iOS applications. Resolution: PR Submitted A pull request with a fix has been provided. Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)
2 participants