在 Android 移动浏览器中选择输入无响应
我有一个简单的表单,其中包含一种选择输入类型,可以在所有桌面浏览器以及移动 Safari 上正常工作。但是,在我的两台 Android 设备(Samsung Droid 和 Prevail)上,选择输入不会响应。我期待它产生一个选择器。有人有类似的经历吗?有什么建议吗?谢谢。
I have a simple form with one select input type that works fine on all desktop browsers as well as mobile Safari. However, on both my Android devices (Samsung Droid and Prevail), the select input will not respond. I'm expecting it to spawn a picker. Has anyone had a similar experience? Any advice? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
刚刚遇到同样的问题。
我正在使用 Bootstrap,下部的
之一具有
col-sm-12
,但没有针对xs
的规则代码>.这导致它无形地掩盖了移动设备中的所有上述表单输入元素。将col-sm-12
切换为col-xs-12
解决了该问题。Just encountered the same issue.
I'm using Bootstrap and one of the
<div>
's in the lower section hadcol-sm-12
, but no rule forxs
. This was causing it to invisibly cover up all of the above form input elements in mobile. Switchingcol-sm-12
tocol-xs-12
fixed the issue.我遇到了类似的问题,并使用以下元标记解决了它:
我注意到,就我而言,当隐藏(并再次显示)父元素时, select 元素的行为为“禁用”。 android中有一个bug =< 2.2 当改变样式时,dom不会重新渲染。您可以通过添加(或更改)“fake”属性来强制 dom 重新渲染,从而强制重新渲染 dom。例如:
I had a similar problem and solved it with the following meta tag:
And I noticed that, in my case, when a parent element was hidden (and displayed again) the select element behaves 'disabled'. There is a bug in android =< 2.2 when you change the style, the dom is not re-rendered. You can force to re-render the dom by adding (or changing) a 'fake' attribute to force dom re-rendering. e.g:
我遇到了这个问题,我认为这与您所说的重叠有关。为了解决这个问题,我将以下 CSS 添加到标签中,如下所示:
这样就完成了工作。 :)
I was having this problem and I think it had something to do with overlapping like you said. To fix it I added the following CSS to the tag like this:
That got the job done. :)