FlagPhoneNumber icon indicating copy to clipboard operation
FlagPhoneNumber copied to clipboard

Phone number field almost impossible to select after changing country

Open pauloec opened this issue 4 years ago • 6 comments

Describe the bug After changing the country flag/code it is super difficult to select the phone number

To Reproduce Steps to reproduce the behavior:

  1. Go to flag/country picker
  2. Click on pick any country
  3. Try to select phone number
  4. Try tapping on phone number placeholder until it finally opens up a numberpad keyboard

Expected behavior User should be able to easily tap the field and edit

Smartphone (please complete the following information):

  • Device: Any iPhone
  • OS: iOS 12, 13
  • Version

FlagPhoneNumber (please complete the following information):

  • Version 0.7.6, 0.7.7, 0.7.8

pauloec avatar Oct 15 '19 08:10 pauloec

having same problem. Version 0.7.6, 0.7.7, 0.7.8 all having same issue

Sunny-Aiub avatar Oct 30 '19 04:10 Sunny-Aiub

I also have the same problem.Able to enter phone number but not showing cursor

vids123 avatar Nov 07 '19 11:11 vids123

Still an issue ?

grifas avatar Dec 04 '19 15:12 grifas

yes I also faced the same issue, the keyboard not change

karthiksaral avatar Mar 26 '20 16:03 karthiksaral

It would seem the UITextField's tintColor is being set to clear somehow. So a workaround is to just set it back to it's original color when it becomes the first responder.

So for Objective-C:

-(void) textFieldDidBeginEditing:(UITextField*)textField
{
   if ( textField == _phoneNumberTextField )
   {
      _phoneNumberTextField.tintColor = _cursorColor; // where _cursorColor is the saved original color from when your view controller's view loads or something.
   }
}

stuartrr avatar Jun 24 '21 03:06 stuartrr

Just put this in textFieldDidEndEditing :

    yourTextField.resignFirstResponder()
    yourTextField.inputView = nil
    yourTextField.inputAccessoryView = nil

JobLess-Engineer avatar May 04 '22 19:05 JobLess-Engineer