1

所以,我有这个 HTML 片段:

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

以及相应的 CSS 片段:

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。

4

1 回答 1

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")) {

修复错误。

于 2012-06-11T23:03:50.667 回答