Skip to content

Instantly share code, notes, and snippets.

@madrobby
Created November 13, 2011 13:04
Show Gist options
  • Save madrobby/1362093 to your computer and use it in GitHub Desktop.
Save madrobby/1362093 to your computer and use it in GitHub Desktop.
Force rendering a DOM element when Webkit is acting up
forceRerenderOnWebkit: ->
@el.parentNode.style.cssText += ';-webkit-transform:rotateZ(0deg)'
@el.parentNode.offsetHeight
@el.parentNode.style.cssText += ';-webkit-transform:none'
@nuragic
Copy link

nuragic commented Jun 10, 2014

Hi guys! Thanks to all for the suggestions... So, anyone know what is the most optimal way to force a reflow? Any jsPerf there? :)

@digitalicarus
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment