BenM
BenM

Reputation: 53198

<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...

Upvotes: 9

Views: 12102

Answers (2)

Joe Johnson
Joe Johnson

Reputation: 1824

-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.

Upvotes: 28

Undefined
Undefined

Reputation: 11431

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

Upvotes: 6

Related Questions