2012-06-11 62 views
1

所以,我有這個片段的HTML:HTML文本輸入不顯示iPad的鍵盤

<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。

+1

在模擬器中試過這個URL http://jsfiddle.net/ZcycL/ - 工作得很好 –

+0

你把整個表單包裝在一個帶有所有必需屬性的'

'-tag中嗎?可能是=和「之間的空格會產生錯誤 –

+0

如果在沒有CSS設置的情況下測試會怎樣? –

回答

1

原來是這個問題:

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

在jQuery UI的觸摸,在功能

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

修復錯誤。