Lawton
Lawton

Reputation: 143

Text Box in iOS webview doesn't accept input

I currently have an iOS webview with a textbox that doesn't work. Specifically, when the webview is selected the keyboard appears but no caret appears, and any keypresses have no effect. What could be causing this? I have already ruled out the textbox being "disabled" or "readonly", since the keyboard does not appear when those two properties exist.

Upvotes: 0

Views: 1681

Answers (2)

Ahrorxudja
Ahrorxudja

Reputation: 1

add this css property to your inputs.

-webkit-user-select: text; 

Upvotes: 0

Lawton
Lawton

Reputation: 143

I was able to find the answer based on a similar working textbox that had an additional class. Apparently iOS requires that the textbox have user-select:text as part of the CSS. Adding a class that had user-select:text enabled fixed the problem.

Upvotes: 1

Related Questions