Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<input> has focus, but can't type in WebKit

I have run into a slight problem, and have been tyring to debug it for the past two hours. After deciding that a fresh brain might be able to assist, I decided to post here.

I know that I should post some code here for legacy purposes, but the question involves significant amounts of code, so it's easier to provide a link.

Please check out the following page: http://ben-major.co.uk/labs/phonee/#overlays. If you tap on Prompt (in Chrome or Mobile Safari), you are presented with a prompt box. Here's the snag:

The field has focus (see the white background, rather than the #eee color of the unfocused field), but when trying to type anything into the field, nothing happens, despite the field having focus. I have tried on my MBP (Chrome), iMac (Chrome), iPad + iPhone, and all have the same problem.

Has anyone run into a similar problem, as I really cannot figure out why this doesn't work. There are no event preventions on keyup or similar events...

like image 975
BenM Avatar asked Jul 26 '12 23:07

BenM


2 Answers

-webkit-user-select: none;

Remove that style, and it works. You can alter it in the reset.css file you're using. This works -webkit-user-select: auto; as well.

like image 94
Joe Johnson Avatar answered Sep 22 '22 15:09

Joe Johnson


On line 46 of reset.css you have -webkit-user-select: none; this doesnt allow users to select the textbox on webkit browsers!

like image 37
Undefined Avatar answered Sep 24 '22 15:09

Undefined