WebTextField.setfocus does not work on iOS browser

I am trying to make a WebApp work on an iPad as close to how it does on a computer and running into a few issues.

I have a whole bunch of text fields some which have a contextual menu pop when tapped or clicked with an “Other” option in the menu to enter manually and not from the menu. Other fields are only enterd manually. This has been easy to accomplish for browsers on the computer.

The most challenging on the iPad are the fields with a contextual menu because I have no control over the keyboard. When the user taps into the field on the computer the contextual menu is displayed. On the iPad both the contextual menu and the keyboard are displayed.

I tried using a button on top of an invisible text field, so that only the contextual menu pops when the button is clicked. This works. The problem, however, is when the user selects “Other”. I set the button to invisible and the text field to visible, but I cannot get the user into the field with the keyboard open. SetFocus does nothing. Unlike on the computer where the cursor ends up in the text field, on the iPad the cursor is nowhere to be found and the keyboard does not pop. The user has to tap the text field.

Is there any other way to do this? Maybe someting with javascript or a plugin?

Thanks for any help.