title: Automatic scrolling when contentEditable/designMode in a UIWebView
body: <p>I am attempting a rich-text editor (with HTML export capability) for an iPhone application I am working on, and decided to use iOS 5's WebKit support for <code>contentEditable</code>/<code>designMode</code>. 
  I have hit a wall with one issue which is breaking for what I need. When editing the content in the UIWebView, there is no automatic scrolling to follow the cursor, like, for example, in UITextView. When typing, the cursor continues under the scrollView and the user has to manually scroll up.</p>
  
  <p>Here is some relevant code:</p>
  
  <pre><code>- (void)webViewDidFinishLoad:(UIWebView *)webView
  {
      NSString *string = @"document.body.contentEditable=true;document.designMode='on';void(0)";
      [webView stringByEvaluatingJavaScriptFromString:string];
  
      [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
  }
  </code></pre>
  
  <p>Any ideas how to remedy this issue? I am not sure if this also occurs in Safari or only in <code>UIWebView</code>'s WebKit implementation.</p>
  
  <p>If you hit this problem, make sure to head over to <a href="https://bugreport.apple.com" rel="noreferrer">https://bugreport.apple.com</a> and duplicate <strong>rdar://16455638</strong>.</p>