Ask webkit iOS a repaint
On iOS6 I had a problem with elements not rendered after changing page in my JS SinglePageApp.
To resolve that, I needed to ask webkit to repaint the view. Two solutions :
forceRedraw: (el) ->
element = $(el)
newEl = document.createTextNode(' ')
element.append(newEl)
newEl.parentNode.removeChild newEl
element
And the magic one \o/ :
el.style.webkitTransform = el.style.webkitTransformWritten by iam4x
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ios
Authors
Did you know?
JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#