Permalink
Browse files

Merge pull request #41 from philipwalton/repaint

Use `offsetWidth` to repaint. (@philipwalton, #41)
  • Loading branch information...
rstacruz committed Dec 18, 2012
2 parents f0bbb83 + 3732485 commit b58f7e569f2de4946b9a1e95b761c2700d15de8a
Showing with 2 additions and 7 deletions.
  1. +2 −7 jquery.transit.js
View
@@ -620,13 +620,8 @@
// Defer running. This allows the browser to paint any pending CSS it hasn't
// painted yet before doing the transitions.
var deferredRun = function(next) {
- var i = 0;
-
- // Durations that are too slow will get transitions mixed up.
- // (Tested on Mac/FF 7.0.1)
- if ((support.transition === 'MozTransition') && (i < 25)) { i = 25; }
-
- window.setTimeout(function() { run(next); }, i);
+ this.offsetWidth; // force a repaint
+ run(next);
};
// Use jQuery's fx queue.

0 comments on commit b58f7e5

Please sign in to comment.