【问题标题】:HTML Text Input not Showing iPad KeyboardHTML 文本输入不显示 iPad 键盘
【发布时间】:2012-06-14 18:19:20
【问题描述】:

所以,我有这个 HTML 的 sn-p:

<input id= "email" type= "text" name= "email"/>

还有这个对应的 CSS 的 sn-p:

input[type="text"]
{
    /* Padding */
    padding: 5px;
    margin: 10px;

    /* Sizes */
    width: 100%;

    /* Rounded Corners */
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;

    /* Decoration */
    border: none;
    outline: none;

    /* Shadows */
    -moz-box-shadow: inset 0 1px 1px rgba(74, 74, 74, 0.8);
    -webkit-box-shadow: inset 0 1px 1px rgba(74, 74, 74, 0.8);
    box-shadow: inset 0 1px 1px rgba(74, 74, 74, 0.8);
}

当我点击输入元素时,什么也没有发生。 iPad 中没有显示键盘。

编辑:此网站使用 jQuery、jQuery UI 和 jQuery UI Touch。

【问题讨论】:

  • 在模拟器中试过这个 URL jsfiddle.net/ZcycL - 工作得很好
  • 您是否将整个表单包装在具有所有必需属性的&lt;form&gt;-tag 中? = 和 " 之间的空格可能会产生错误。
  • 如果不使用 CSS 设置进行测试会怎样?

标签: html css ipad jquery-ui html-input


【解决方案1】:

原来是这个问题:

http://code.google.com/p/jquery-ui-for-ipad-and-iphone/issues/detail?id=17

在 jQuery UI Touch 中,在函数中

function iPadTouchHandler(event) {

在开关/外壳中

    switch (event.type) {
        case "touchstart":

改变

            if ($(event.changedTouches[0].target).is("select")) {

            if ($(event.changedTouches[0].target).is("select") || $(event.changedTouches[0].target).is("input")) {

修复错误。

【讨论】:

    猜你喜欢
    • 2011-12-10
    • 2011-06-06
    • 1970-01-01
    • 2013-12-05
    • 2016-04-30
    • 1970-01-01
    • 2012-07-12
    • 2011-05-08
    • 1970-01-01
    相关资源
    最近更新 更多