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

Error when there is a fixed header and no footer (1.1 RC1) #3675

Closed
PikeDev opened this Issue Feb 29, 2012 · 3 comments

Comments

Projects
None yet
4 participants
@PikeDev

PikeDev commented Feb 29, 2012

Tested on platform: Chrome 17

When a page contains only a fixed header and the page is switched, the following code will break:
jquery.mobile-1.1.0-rc.1.js @ 7075

nextFooter.add(nextHeader).appendTo($.mobile.pageContainer);

"nextFooter" will be 0 at this point when the page has no footer specified and will therefore throw an error when trying to "add".

@Wilto

This comment has been minimized.

Show comment
Hide comment
@Wilto

Wilto Feb 29, 2012

Contributor

Hey @Urmel,

Thanks for the bug report! Could you provide a reduced test case in the form of a jsbin or jsfiddle? You can use this one as the basis, linking to the latest code in our repo: http://jsbin.com/uvopaf/edit

Contributor

Wilto commented Feb 29, 2012

Hey @Urmel,

Thanks for the bug report! Could you provide a reduced test case in the form of a jsbin or jsfiddle? You can use this one as the basis, linking to the latest code in our repo: http://jsbin.com/uvopaf/edit

@PikeDev

This comment has been minimized.

Show comment
Hide comment
@PikeDev

PikeDev Feb 29, 2012

Here you go: http://jsfiddle.net/qkgbE/
Click the "Two" to reproduce the issue. Thanks for reviewing the case.

PikeDev commented Feb 29, 2012

Here you go: http://jsfiddle.net/qkgbE/
Click the "Two" to reproduce the issue. Thanks for reviewing the case.

@DGuidi

This comment has been minimized.

Show comment
Hide comment
@DGuidi

DGuidi Mar 1, 2012

+1 for the bug.
fixed with
// if( nextFooter.length || nextHeader.length ){
if( nextFooter.length && nextHeader.length ){
nextFooter.add( nextHeader ).appendTo( $.mobile.pageContainer );
ui.nextPage.one( "pageshow", function(){
nextFooter.add( nextHeader ).appendTo( this );
);
}

line 7081 in uncompressed file

DGuidi commented Mar 1, 2012

+1 for the bug.
fixed with
// if( nextFooter.length || nextHeader.length ){
if( nextFooter.length && nextHeader.length ){
nextFooter.add( nextHeader ).appendTo( $.mobile.pageContainer );
ui.nextPage.one( "pageshow", function(){
nextFooter.add( nextHeader ).appendTo( this );
);
}

line 7081 in uncompressed file

@johnbender johnbender closed this in b9e8de5 Mar 6, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment