iOS HTML输入标签停止在可滚动元素中滚动 [英] iOS HTML Input Tag Stops Scrolling in Scrollable Element

查看:169
本文介绍了iOS HTML输入标签停止在可滚动元素中滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的移动网站具有包含输入标签的固定可滚动( overflow-y:auto )元素。在iPhone和iPad上,触摸并移动输入标签阻止元素滚动,但触摸和移动标签(或任何其他)不会。此问题不会在Android上发生。

My mobile website has a fixed scrollable (overflow-y:auto) element that contains input tags. On iPhone and iPad, touching and moving on the input tags block the element from scrolling but touching and moving on labels (or anything else) do not. This issue does not occur on Android.

输入标记曾用于 table 之前,我切换到 div s的布局和滚动工作然后为iOS和Android。当输入标签不在中时,是否有滚动被阻止的原因?我真的不想回到的布局。

The input tags used to be part of a table before I switched to divs for layout and the scrolling worked then for iOS and Android. Is there a reason why scrolling is blocked when the input tags are not in tables? I really prefer not having to go back to tables for layout.

我也试过 -webkit-overflow-scrolling:touch 它解决了iPhone的问题,但防止在iPad上完全滚动,允许用户横向滚动,我不想要。

I also tried -webkit-overflow-scrolling: touch and it fixed the issue for iPhone but prevents scrolling completely on iPad on top of allowing users to scroll horizontally which I don't want.

更新:如果软键盘处于活动状态,则一切正常。只有当我遇到问题时键盘不活动。

UPDATE: If the soft keyboard is active everything works as intended. Only when the keyboard is not active when I get the issue.

推荐答案

问题可能是浏览器。你使用safari还是其他浏览器?也许更新浏览器或尝试在不同的iOS设备上工作?

The problem could be the browser. Do you use safari or another browser? Maybe updating the browser or trying it on a different iOS device will work?

这篇关于iOS HTML输入标签停止在可滚动元素中滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆