Rey Libutan
Rey Libutan

Reputation: 5314

Why doesn't this work on iPad?

It properly works on all browsers, just on iPad safari. If I emulate as iPad user agent on the browser, it just works fine.

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

The problem is that If I type text (Add Text), the keyboard in iPad shows, I can press keys, but it doesn't show in the draggable div. Even the default text stays the same.

I don't know that the problem is :(

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();
}

Upvotes: 1

Views: 194

Answers (1)

Rey Libutan
Rey Libutan

Reputation: 5314

According to my research this is a bug/(specific feature) in iOS regarding focus (or delagating focus) events. This was dropped afterwards.

Mobile Safari Autofocus text field

Upvotes: 1

Related Questions