2

Possible Duplicate:
Show keyboard in contenteditable UIWebView programmatically

I want to make something like a WYSIWYG-Editor on the iPhone (iOS5). After searching the web I found a great tutorial which uses a UIWebView with a contenteditable div. It works as expected and I'm really pleased with the result.

But there's one thing that doesn't work. I can't focus the contenteditable div via JavaScript (stringByEvaluatingJavaScriptFromString:). I've tried everything I know... focus (w/ and w/o jQuery), I've tried to simulate a click (also w/ and w/o jQuery), ...

I'd like the keyboard to show up as soon as the view is presented.

enter image description here

Cœur
  • 37,241
  • 25
  • 195
  • 267
0xJoKe
  • 843
  • 10
  • 18
  • 1
    I don't think this is currently possible: the browser requires a genuine user interaction to allow focus. – Tim Down Jul 12 '12 at 07:34

0 Answers0