简体   繁体   中英

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM