2013-04-05 45 views
1

它适用于所有浏览器,仅适用于iPad Safari浏览器。 如果我在浏览器上作为iPad用户代理进行模拟,它可以正常工作。为什么不在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(); 
} 

回答

1

根据我的研究,这是iOS中关于焦点(或delagating焦点)事件中的错误/(特定功能)。 这是下降算账。

Mobile Safari Autofocus text field

+0

链接到这是一个错误的证明将是一件好事,至少引用了一些来源。基本上说的回答“这是一个错误”,没有什么更多的是质量非常低。 – 2013-10-21 07:59:34

+0

是我会试着去搜索为那个bug票证。正在搜索... – Incognito 2013-10-21 08:02:04

+0

我在SO中添加了一个类似问题的链接,详细信息。我会添加错误票的链接如果我稍后会遇到它。 – Incognito 2013-10-21 08:09:54

相关问题