Browse Source

Fix issue #409

Force IE to repaint element to start the animation.

More details here:
https://github.com/Semantic-Org/Semantic-UI/issues/409
pull/433/head
Mohammad Younes 11 years ago
parent
commit
e923972446
1 changed files with 11 additions and 3 deletions
  1. 14
      src/modules/transition.js

14
src/modules/transition.js

@ -165,9 +165,17 @@ $.fn.transition = function() {
$.proxy(settings.complete, this)(); $.proxy(settings.complete, this)();
}, },
repaint: function(fakeAssignment) {
repaint: function(removeThenAdd) {
module.verbose('Forcing repaint event'); module.verbose('Forcing repaint event');
fakeAssignment = element.offsetWidth;
var fakeAssignment = element.offsetWidth;
if (removeThenAdd) {
var parent = $module.parent();
var next = $module.next();
if (next.length == 0)
$module.detach().appendTo(parent);
else
$module.detach().before(next);
}
}, },
has: { has: {
@ -426,7 +434,7 @@ $.fn.transition = function() {
.addClass(className.transition) .addClass(className.transition)
.addClass(className.visible) .addClass(className.visible)
; ;
module.repaint();
module.repaint(true/*or better: true only if its IE*/);
}, },
start: function() { start: function() {

Loading…
Cancel
Save