sbycrosz / react-native-credit-card-input

Easy, cross-platform credit-card input for your React Native Project! Start accepting payment 💰 in your app today!
MIT License
1.46k stars 699 forks source link

keyboardType="numeric" triggers custom keyboard on ios #133

Closed IgorVanian closed 2 months ago

IgorVanian commented 5 years ago

Original issue: https://github.com/facebook/react-native/issues/22392

This issue appeared while being tested on iPhone X. Impossible to change the keyboard type after it has been triggered.

kumashiro17 commented 4 years ago

work around until fixed in Xcode

    func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool {
        if textField == yourField { textField.keyboardType = .numbersAndPunctuation }
        return true
    }
devpolo commented 4 years ago

work around until fixed in Xcode

    func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool {
        if textField == yourField { textField.keyboardType = .numbersAndPunctuation }
        return true
    }

Where should we paste this code in Xcode?

JulianKingman commented 4 years ago

I think it goes in RCTBackedTextInputDelegateAdapter.m, @kumashiro17 can you confirm? Also, what is the real issue here?