3

In Mobile Safari (5.1.1), if an HTML input has focus and is re-parented in the DOM, it loses focus. And because of this related issue: Mobile Safari Autofocus text field - it is not possible to programmatically give the input focus again if it was previously focused.

JS Fiddle of the re-parenting issue: http://jsfiddle.net/Ex7j7/2/

I have settled on accepting this re-parent / focus loss issue. Unless anyone can edit this JS fiddle to prove otherwise.

Community
  • 1
  • 1
jfroom
  • 660
  • 7
  • 17
  • So... are you asking how to fix this? – Charlie Jun 17 '12 at 02:27
  • Original post has been simplified. A fix would be great, but most likely this is an iOS "feature". In which case, this post helps informs others searching on the same issue know that they are not alone. Cheers. – jfroom Jun 18 '12 at 03:40

0 Answers0