簡體   English   中英

為什么這在iPad上不起作用?

[英]Why doesn't this work on iPad?

它可以在所有瀏覽器上正常運行,僅在iPad Safari上即可。 如果我在瀏覽器上模擬為iPad用戶代理,則可以正常工作。

http://jsfiddle.net/NMcuy/38/embedded/result/

問題是,如果我鍵入文本(添加文本),則iPad上的鍵盤會顯示出來,我可以按下按鍵,但是在可拖動的div中卻沒有顯示。 即使默認文本也保持不變。

我不知道問題是:(

function newText()
{
var note = new Note();
note.id = ++highestId;

var text = document.createElement('textarea');
text.name = "text";
text.setAttribute("onkeyup", "textAreaAdjust(this)");
text.setAttribute("class", "text");
//text.innerHTML = initialText;
note.contentField.appendChild(text);

note.name = note.id + "_text";
note.left = Math.round(Math.random() * 400) + 'px';
note.top = Math.round(Math.random() * 500) + 'px';
note.zIndex = ++highestZ;
note.saveAsNew();
}

根據我的研究,這是iOS中有關焦點(或延遲焦點)事件的錯誤/(特定功能)。 此后被刪除。

移動Safari自動對焦文本字段

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM