Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Input text doesn't show keyboard on iOS simulator

I'm building an app and I need to use an input text.

The problem comes when you tap on this input text, the keyboard doesn't appear.

I don't know why, I don't know what I'm doing wrong. It is supposed to be straightforward.

Here is some of my code:

<View style={ styles.storyContentContainer }>     <TextInput ref='username' style={{width: 300, height: 20, borderWidth: 1,}}/> </View> 

And a video to show to you guys when the input text gets the focus nothing happen:

enter image description here

I hope you guys can help me with this issue.

like image 452
JV Lobo Avatar asked Jan 24 '16 15:01

JV Lobo


People also ask

How do I bring up the keyboard in iOS simulator?

Just press ⌘K it will toggle keyboard.

How do you hide the keyboard on iPhone simulator?

Tap in a text field. Tap the "hide keyboard" button in bottom-right corner. Tap to another text field.

How do you enable Accessibility on iPhone simulator?

Run your app in iOS Simulator (for more information on how to do this, see Simulator User Guide). In the simulated device environment, press the Home button to reveal the Home screen. Open Settings and go to General > Accessibility. Slide the Accessibility Inspector switch control to On.

How do I debug iPhone simulator?

You'll need to go to Settings > Advanced and check the Show Debug Menu option. Then you'll see the option to open the web inspector for the Simulator right from that menu. With the Web Inspector open, you can debug inside the Simulator just like you could right in a desktop browser with DevTools.


2 Answers

I assume you are running this on the iOS simulator? Turn off the host machine's hardware keyboard integration by unchecking Hardware > Keyboard > Connect Hardware Keyboard, or you can use the Keyboard Shortcut: Shift + Cmd + K, and the keyboard will appear when you focus on a TextInput.

You can also manually toggle the software keyboard visibility with Cmd +K.

On a real device the keyboard should work out-of-the-box as expected.

like image 81
jevakallio Avatar answered Sep 22 '22 13:09

jevakallio


Here is how you can easily disconnect your hardware key board. Now when you will focus inside textInput area, it will open the keypad of iOS simulator Image shows how to disconnect your hardware keyboard from iOS simulator

like image 28
Abdullah Avatar answered Sep 19 '22 13:09

Abdullah