react-native icon indicating copy to clipboard operation
react-native copied to clipboard

setting returnKeyType on a TextInput with textContentType="creditCardNumber" overrides keyboardType

Open CoryWritesCode opened this issue 3 years ago • 6 comments

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

Noticed recently that setting a returnKeyType on a TextInput component with the textContentType as creditCardNumber it overrides the keyboardType. It seems to set it to numbers-and-punctuation instead. Is this expected?

React Native version:

react-native info output

System:
    OS: macOS 10.15.7
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Memory: 1.31 GB / 32.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.15.1 - /var/folders/l3/z_vjs3sn3s58k2cqx56hk8r40000gn/T/yarn--1608006491335-0.8805972470759205/node
    Yarn: 1.22.4 - /var/folders/l3/z_vjs3sn3s58k2cqx56hk8r40000gn/T/yarn--1608006491335-0.8805972470759205/yarn
    npm: 6.14.8 - ~/.nvm/versions/node/v14.15.1/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.2, DriverKit 20.0, macOS 11.0, tvOS 14.2, watchOS 7.1
    Android SDK:
      API Levels: 28, 29, 30
      Build Tools: 28.0.3, 29.0.0, 29.0.2, 29.0.3, 30.0.1
      System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6514223
    Xcode: 12.2/12B45b - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_251 - /Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home/bin/javac
    Python: 2.7.18 - /usr/local/bin/python
  npmPackages:
    @react-native-community/cli: ^4.7.0 => 4.13.1 
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.2 => 0.63.2 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Set textContentType="creditCardNumber" on TextInput
  2. set any returnKeyType prop
  3. tap into TextInput

Expected Results

Keyboard type should take precedent.

Snack, code example, screenshot, or link to a repository:

snack with example

CoryWritesCode avatar Dec 15 '20 04:12 CoryWritesCode

I am still facing this issue. Has anyone been able to solve it or does the RN team plan to add a fix in a future release?

KirilVelichkov avatar Aug 30 '21 13:08 KirilVelichkov

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

stale[bot] avatar Jan 09 '22 13:01 stale[bot]

Issue exists in RN 0.66.4

lindboe avatar Jan 17 '22 22:01 lindboe

Issue still exists in RN 0.68.2

eminsr avatar Jun 16 '22 09:06 eminsr

This issue still persists in version 0.72.5

eminsr avatar Oct 24 '23 13:10 eminsr

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Apr 22 '24 05:04 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Apr 29 '24 05:04 github-actions[bot]