Fix on-transition-end repaint in Chrome, flickering issues on Safari