Skip to content
This repository

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

Closed
Urmel opened this Issue · 3 comments

4 participants

Urmel John Bender Mat Marquis Diego Guidi
Urmel

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".
Mat Marquis

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

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

Diego Guidi

+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

John Bender johnbender closed this in b9e8de5
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.