Transitions with Pages that have Fixed Toolbars #4424

Closed
ToddThomson opened this Issue May 23, 2012 · 3 comments

Projects

None yet

4 participants

@ToddThomson

The fixed toolbar widget does not clean up properly after the show() function is called. It does not remove the "In" class when a transition has occurred ( the default slidedown transition ).

This causes grief for page transitions as the fixed toolbar header animation starts as the "to" page is transitioned to. Since the toolbar animation completes first, the page transition animationComplete event is triggered too early.

@ToddThomson

The fix for this issue is to add an animationComplete handler which removes the "in" class:

show: function (notransition) {
var hideClass = "ui-fixed-hidden",
$el = this.element;
if (this._useTransition(notransition)) {
$el
.removeClass("out " + hideClass)
.addClass("in")
.animationComplete(function () {
$el.removeClass('in');
});
}
else {
$el.removeClass(hideClass);
}
this._visible = true;
},

@scottjehl scottjehl was assigned Jun 8, 2012
@ToddThomson

I've turned off the tap to hide/show fixed toolbars so I no longer run into this issue, but it is a very simple fix to properly cleanup after a show transition ( removal of the "in" class ) - nice to have in 1.1.1!

@arschmitz
Member

ill look into this one at summit today

@arschmitz arschmitz added a commit to arschmitz/jquery-mobile that referenced this issue Oct 16, 2012
@arschmitz arschmitz Fix for issue #4424 fixedToolbar Widget does not remove in class on a…
…nimation complete.
7bb3faa
@arschmitz arschmitz added a commit to arschmitz/jquery-mobile that referenced this issue Oct 16, 2012
@arschmitz arschmitz Fix for issue #4424 - Transitions with Pages that have Fixed Toolbars…
… - Remove class in class after transition completes
00a2926
@Wilto Wilto closed this Oct 16, 2012
@johnbender johnbender added a commit that referenced this issue Oct 17, 2012
@johnbender johnbender remove test for the in fixed-toolbar suite
Previously the in class was left on the fixed toolbar but the fix
for issue #4424 was to strip it on animation complete which makes
the test hard if not impossible. Preferring working functionality
to crazy tests.
0ff7e29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment