Fixed slide transition flicker in Safari

Here is a new pull request, rebased to master, something went wrong with updating the previous one.