Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

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

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

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

PikeDev opened this issue Feb 29, 2012 · 3 comments

Comments

@PikeDev
Copy link

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
Copy link
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
Copy link
Author

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
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants