Skip to content
This repository has been archived by the owner on Jan 31, 2019. It is now read-only.

Commit

Permalink
transitionend event after CSS transition was not fired. Manually kick…
Browse files Browse the repository at this point in the history
… off cleanup for mobile only. Bug 631673.
  • Loading branch information
Fred Wenzel committed Feb 8, 2011
1 parent d32b4d2 commit f8cc3fa
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
3 changes: 3 additions & 0 deletions media/css/release-mobile.css
Expand Up @@ -432,3 +432,6 @@ html.transitioning article.entering {
-moz-transition-timing-function: ease-in-out;
}

html.transitioning footer {
display: none;
}
14 changes: 12 additions & 2 deletions media/js/release.js
Expand Up @@ -26,16 +26,26 @@
.css({ left: toStart, right: -toStart, display: 'block' });
$('html').addClass('transitioning');

toElem.one('transitionend', function(e) {
// Things to do after CSS transition
// This can move back into the "transitionend" event handler once
// Fennec decides to fire it.
var transitionend = function(e) {
fromElem.css({display: 'none'});
toElem.removeClass('entering');
$('html').removeClass('transitioning');
if (callback) callback();
});
};
if (!$('html').hasClass('mobile')) {
toElem.one('transitionend', transitionend());
}

setTimeout(function() {
fromElem.css({ left: fromEnd, right: -fromEnd });
toElem.css({ left: 0, right: 0 });

if ($('html').hasClass('mobile')) {
transitionend();
}
}, 100);

return this;
Expand Down
2 changes: 1 addition & 1 deletion templates/base_feedback_release_mobile.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="{{ LANG }}" dir="{{ DIR }}">
<html lang="{{ LANG }}" dir="{{ DIR }}" class="mobile">
<head>
<link rel="shortcut icon" type="image/png" href="{{ MEDIA_URL }}img/favicon.png"/>
{% block site_css %}
Expand Down

0 comments on commit f8cc3fa

Please sign in to comment.