iOS HTML Input Tag Stops Scrolling in Scrollable Element

落花浮王杯 提交于 2019-12-22 10:31:26

问题


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.

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.

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.


回答1:


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?



来源:https://stackoverflow.com/questions/14333410/ios-html-input-tag-stops-scrolling-in-scrollable-element

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!