Assuming shiraldi is required, the following result was found.
up the template layouts for me. I really like the solution (and think it should be voted best answer) put forward by Mark Shiraldi: The code is minimal but does what it needs to do (tested on iOS) and doesn't appear to effect other javascripts. Put this...