简体   繁体   English

<input>具有焦点,但无法键入WebKit

[英]<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 . 请查看以下页面: 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. 如果您点按“ Prompt (在Chrome或移动版Safari中),系统会显示一个提示框。 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. 该字段具有焦点(参见白色背景,而不是未聚焦字段的#eee颜色),但是当尝试在字段中键入任何内容时,尽管字段具有焦点,但没有任何反应。 I have tried on my MBP (Chrome), iMac (Chrome), iPad + iPhone, and all have the same problem. 我试过我的MBP(Chrome),iMac(Chrome),iPad + iPhone,但都有同样的问题。

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. 您可以在正在使用的reset.css文件中更改它。 This works -webkit-user-select: auto; 这工作-webkit-user-select: auto; as well. 同样。

On line 46 of reset.css you have -webkit-user-select: none; 在reset.css的第46行,你有-webkit-user-select: none; this doesnt allow users to select the textbox on webkit browsers! 这不允许用户在webkit浏览器上选择文本框!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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