iPad表单禁用[上一页|下一个]按钮 [英] iPad form disable [previous | next] buttons
问题描述
所以我有一个存在于滑块中的表单向导。整个想法是根据他们的决定来引导人们。问题是ipad。在iPad上它允许你点击[previous | next]来浏览表单上的字段,这打破了门控策略。
So I have a form wizard that exists in a slider. The whole idea is to gate people based on their decisions. The problem is the ipad. On the iPad it allows you to hit [previous|next] to move through fields on the form, and this breaks the gating strategy.
在桌面浏览器上我压缩了 TAB
键在门控字段上的按键上返回false。但是在iPad上我看不到任何解决方案。
On desktop browsers I suppressed the TAB
key by returning false on keypress on gated fields. But on the iPad I see no solution.
我尝试了tabindex并将门控输入设置为-1。这里的问题是,在他们穿过大门之后,[previous | next]按钮会被反应并且搞乱一切。
I've tried tabindex and set gated inputs to -1. The problem here is that after they move through the gate the [previous|next] buttons reactive and mess everything up.
有没有办法我可以一起删除这些按钮?或者将它们捕获为js事件?
Is there a way I can remove those buttons all together? Or capture them as a js event?
(注意这是一个移动网页,而不是应用程序)
(NOTE this is a mobile web page, not an app)
推荐答案
我解决这个问题的方法是禁用
并设置 visibility:hidden
在用户无法选择的任何表单元素上。这是一个痛苦的屁股,但它在iOS 5上运行良好。
The way I solved this problem was to disable
and set visibility: hidden
on any form elements that the user should not be able to tab to. This is a pain in the ass, but it works well on iOS 5.
这篇关于iPad表单禁用[上一页|下一个]按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!