New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transitions with Pages that have Fixed Toolbars #4424

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

Comments

Projects
None yet
4 participants
@ToddThomson

ToddThomson commented May 23, 2012

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

This comment has been minimized.

Show comment
Hide comment
@ToddThomson

ToddThomson May 24, 2012

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;
},

ToddThomson commented May 24, 2012

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;
},

@ghost ghost assigned scottjehl Jun 8, 2012

@ToddThomson

This comment has been minimized.

Show comment
Hide comment
@ToddThomson

ToddThomson Jun 21, 2012

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!

ToddThomson commented Jun 21, 2012

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

This comment has been minimized.

Show comment
Hide comment
@arschmitz

arschmitz Oct 16, 2012

Member

ill look into this one at summit today

Member

arschmitz commented Oct 16, 2012

ill look into this one at summit today

arschmitz added a commit to arschmitz/jquery-mobile that referenced this issue Oct 16, 2012

arschmitz added a commit to arschmitz/jquery-mobile that referenced this issue Oct 16, 2012

Fix for issue jquery#4424 - Transitions with Pages that have Fixed To…
…olbars - Remove class in class after transition completes

@Wilto Wilto closed this Oct 16, 2012

johnbender added a commit that referenced this issue Oct 17, 2012

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment