Skip to content

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

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

4 participants

@Urmel
Urmel 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" will be 0 at this point when the page has no footer specified and will therefore throw an error when trying to "add".
@Wilto
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

@Urmel
Urmel commented Feb 29, 2012

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

@DGuidi
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
Something went wrong with that request. Please try again.