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

Keyboard on iOS 18 changes from uppercase to lowercase when changing the text input field #47997

Open
huult opened this issue Nov 28, 2024 · 3 comments
Labels
API: Keyboard Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Platform: iOS iOS applications.

Comments

@huult
Copy link

huult commented Nov 28, 2024

Description

I encountered an issue where the keyboard changes from uppercase to lowercase when switching focus between two TextInput fields. Specifically, when focusing from Text Input Field A to Text Input Field B, and then back from Text Input Field B to Text Input Field A, the keyboard behavior unexpectedly switches between uppercase and lowercase.

This issue occurs on iOS 18.

Steps to reproduce

  1. Add two TextInput fields.
  2. Focus on TextInput 1 and input some text (e.g., "T").
  3. Focus on TextInput 2 and input some text (e.g., "B").
  4. Focus back on TextInput 1.
  5. Focus back on TextInput 2.
  6. Observe that the keyboard switches from uppercase to lowercase and the first letter of the text remains uppercase.
                    <View style={styles.mb4}>
                        <TextInput
                            accessibilityLabel="Text input field"
                            style={{
                                width: 100,
                                height: 40, // Added height for the input box
                                borderWidth: 1, // Corrected border style
                                backgroundColor: 'red', // Corrected background color property
                            }}
                        />
                    </View>
                    <View>
                        <TextInput
                            accessibilityLabel="Text input field"
                            style={{
                                width: 100,
                                height: 40, // Added height for the input box
                                borderWidth: 1, // Corrected border style
                                backgroundColor: 'red', // Corrected background color property
                            }}
                        />
                    </View>
Screen.Recording.2024-11-28.at.13.41.35.mov

React Native Version

0.76.3

Affected Platforms

Runtime - iOS

Output of npx react-native info

System:
  OS: macOS 15.0
  CPU: (11) arm64 Apple M3 Pro
  Memory: 244.06 MB / 18.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.15.1
    path: ~/.nvm/versions/node/v20.15.1/bin/node
  Yarn: Not Found
  npm:
    version: 10.7.0
    path: ~/.nvm/versions/node/v20.15.1/bin/npm
  Watchman:
    version: 2024.09.23.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods: Not Found
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.0
      - iOS 18.0
      - macOS 15.0
      - tvOS 18.0
      - visionOS 2.0
      - watchOS 11.0
  Android SDK:
    API Levels:
      - "31"
      - "33"
      - "34"
    Build Tools:
      - 34.0.0
      - 35.0.0
    System Images:
      - android-34-ext12 | Google Play ARM 64 v8a
      - android-34 | Intel x86_64 Atom
      - android-34 | Google APIs ARM 64 v8a
      - android-34 | Google APIs Intel x86_64 Atom
      - android-35 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.19072.14.2412.12360217
  Xcode:
    version: 16.0/16A242d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.12
    path: /usr/bin/javac
  Ruby:
    version: 3.3.4
    path: /Users/lehuu/.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.76.3
    wanted: 0.76.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

N/A

Reproducer

https://snack.expo.dev/pT5crg9nC5joocIBBOZGo

Screenshots and Videos

Screen.Recording.2024-11-28.at.13.41.35.mov
@react-native-bot react-native-bot added API: Keyboard Platform: iOS iOS applications. Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Nov 28, 2024
@react-native-bot
Copy link
Collaborator

Warning

Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:

@kapilw360
Copy link

autoCapitalize="none"

add this property in TextInput.

@huult
Copy link
Author

huult commented Dec 3, 2024

@kapilw360 I still want to keep the first letter uppercase. If we set none, that feature will be skipped

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API: Keyboard Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Platform: iOS iOS applications.
Projects
None yet
Development

No branches or pull requests

4 participants