Browse Source

Fix push.js transition for firefox

pull/606/head
Pierre Skowron 11 years ago
parent
commit
530ac085c5
  1. 6
      js/push.js

6
js/push.js

@ -352,23 +352,28 @@
container.classList.remove('in');
var fadeContainerEnd = function () {
container.removeEventListener('webkitTransitionEnd', fadeContainerEnd);
container.removeEventListener('transitionend', fadeContainerEnd);
swap.classList.add('in');
swap.addEventListener('webkitTransitionEnd', fadeSwapEnd);
swap.addEventListener('transitionend', fadeSwapEnd);'s'
};
var fadeSwapEnd = function () {
swap.removeEventListener('webkitTransitionEnd', fadeSwapEnd);
swap.removeEventListener('transitionend', fadeSwapEnd);
container.parentNode.removeChild(container);
swap.classList.remove('fade');
swap.classList.remove('in');
complete && complete();
};
container.addEventListener('webkitTransitionEnd', fadeContainerEnd);
container.addEventListener('transitionend', fadeContainerEnd);
}
if (/slide/.test(transition)) {
var slideEnd = function () {
swap.removeEventListener('webkitTransitionEnd', slideEnd);
swap.removeEventListener('transitionend', slideEnd);
swap.classList.remove('sliding', 'sliding-in');
swap.classList.remove(swapDirection);
container.parentNode.removeChild(container);
@ -381,6 +386,7 @@
container.classList.add(containerDirection);
swap.classList.remove(swapDirection);
swap.addEventListener('webkitTransitionEnd', slideEnd);
swap.addEventListener('transitionend', slideEnd);
}
};

Loading…
Cancel
Save