在Jquery Mobile應用程序中,我遇到了僅在iPhone 5設備上出現的問題。其他iPhone版本(至少5以上)和所有其他平臺沒有問題。 在頁面內我有一個對話框。在對話框中有幾個選擇。 當點擊確定按鈕或取消按鈕(tsBtnOK,tsBtnCancel)時,選擇寬度id'transJobType'進入焦點並等待用戶選擇,執行停止。 tbBtnOK的代碼永遠不會執行。沒有代碼在tsBtnOK上運行也會發生同樣的情況。選擇焦點並阻止iPhone 5上的進一步執行
我曾嘗試:
- 數據菜單本地假/真沒有什麼區別
- 數據防止對焦變焦,假/真沒有什麼區別
- 編碼集中到tsBtnOK,沒有差異
請記住,這隻發生在iPhone 5平臺上,但在我測試過的所有(3+)iPhone 5設備上保持一致。
看起來,當兩個面板:'transWorkTypeDiv'和'transDescriptionDiv'被隱藏時,它的作用就在於選擇仍然很快顯示,但tsBtnOK上的代碼被執行並且完成時對話框關閉。
注意,標記是一個ASPX頁面的一部分,因此多數民衆贊成在 <%= GetLocalResourceObject ...>標籤
任何提示或想法將是真正的原因十分讚賞
<div data-role="popup" id="tsTransDialog" data-overlay-theme="a" data-transition="flip" data-position-to="window" data-theme="<%=global_asax.JQMTheme%>" class="ui-corner-all">
<div data-role="header" data-theme="a" class="ui-corner-top">
<h1><%=GetLocalResourceObject("TimesheetTransDiaHeader") %></h1>
</div>
<div data-role="content" data-theme="d" class="ui-corner-bottom ui-content">
<div id="tsTransDialogFields">
<div id="divWorkSelect" class="jobOnly ui-field-contain">
<label for="transJobType"><%=GetLocalResourceObject("TimesheetJobType") %></label>
<select name="transJobType" data-mini="true" data-native-menu="true" data-prevent-focus-zoom="true" onchange="tsOpenJobPicker();" id="transJobType">
</select>
</div>
<div class="jobOnly" data-role="fieldcontain">
<label for="transJobNo"><%=GetLocalResourceObject("TimesheetJobNo") %></label>
<div>
<input type="text" data-inline="true" id="transJobNo" placeholder="<%=GetLocalResourceObject("TimesheetExampleJobNo") %>" />
<div style="position: absolute; top: 25px; right: -4px">
<a href="javascript:tsOpenJobPicker();" data-role="button" data-inline="true" data-mini="true" data-iconpos="notext" data-icon="search"></a>
</div>
</div>
</div>
<div id="transStartTimeDiv" data-role="fieldcontain">
<label for="transStartTime"><%=GetLocalResourceObject("TimesheetStartTime") %></label>
<input type="text" data-inline="true" id="transStartTime" placeholder="<%=GetLocalResourceObject("TimesheetExampleTime") %>13:05" />
</div>
<div id="transStopTimeDiv" data-role="fieldcontain">
<label for="transStopTime"><%=GetLocalResourceObject("TimesheetStopTime") %></label>
<input type="text" data-inline="true" id="transStopTime" placeholder="<%=GetLocalResourceObject("TimesheetExampleTime") %>14:55" />
</div>
<div id="transHoursDiv" data-role="fieldcontain">
<label for="transHours"><%=GetLocalResourceObject("TimesheetHours") %></label>
<input type="text" data-inline="true" id="transHours" placeholder="<%=GetLocalResourceObject("TimesheetExampleTime") %> 2,5" />
</div>
<div id="transWorkTypeDiv" data-role="fieldcontain">
<label for="selectTransWorkType"><%=GetLocalResourceObject("TimesheetWorkType") %></label>
<select name="selectTransWorkType" data-mini="true" data-native-menu="true" data-prevent-focus-zoom="true" id="selectTransWorkType"></select>
</div>
<div id="transDescriptionDiv">
<div id="transDescriptionDiv1" data-role="fieldcontain">
<label for="transDescription1"><%=GetLocalResourceObject("TimesheetTransDescription1") %></label>
<input type="text" data-inline="true" data-mini="true" id="transDescription1" name="transDescription1" />
</div>
<div id="transDescriptionDiv2" data-role="fieldcontain">
<label for="transDescription2"><%=GetLocalResourceObject("TimesheetTransDescription2") %></label>
<input type="text" data-inline="true" data-mini="true" id="transDescription2" name="transDescription2" />
</div>
</div>
</div>
<a id="tsBtnOK" href="javascript:tsTransInsert();" data-role="button" data-mini="true" data-inline="true" data-theme="<%=global_asax.JQMTheme%>"><%=GetLocalResourceObject("TimesheetTransUpdate") %></a>
<a id="tsBtnCancel" href="#" data-role="button" data-rel="back" data-mini="true" data-inline="true" data-theme="<%=global_asax.JQMTheme%>"><%=GetLocalResourceObject("Cancel") %></a>
</div>
</div>