Browse files

Merge branch 'patch-93' of https://github.com/MauriceG/jquery-mobile

…into MauriceG-patch-93
  • Loading branch information...
1 parent d2fd2ac commit 45d19d16aac734af17b6909e21e24ec3fefcc1fb @jaspermdegroot jaspermdegroot committed Jun 15, 2012
Showing with 8 additions and 5 deletions.
  1. +8 −5 js/jquery.mobile.fixedToolbar.js
View
13 js/jquery.mobile.fixedToolbar.js
@@ -131,15 +131,17 @@ define( [ "jquery", "./jquery.mobile.widget", "./jquery.mobile.core", "./jquery.
}
} )
.bind( "webkitAnimationStart animationstart updatelayout", function(){
+ var thisPage = this;
if( o.updatePagePadding ){
- self.updatePagePadding();
+ self.updatePagePadding( thisPage );
}
})
.bind( "pageshow", function(){
- self.updatePagePadding();
+ var thisPage = this;
if( o.updatePagePadding ){
+ self.updatePagePadding( thisPage );
$( window ).bind( "throttledresize." + self.widgetName, function(){
- self.updatePagePadding();
+ self.updatePagePadding( thisPage );
});
}
})
@@ -174,14 +176,15 @@ define( [ "jquery", "./jquery.mobile.widget", "./jquery.mobile.core", "./jquery.
_visible: true,
// This will set the content element's top or bottom padding equal to the toolbar's height
- updatePagePadding: function() {
+ updatePagePadding: function( tbPage ) {
var $el = this.element,
header = $el.is( ".ui-header" );
// This behavior only applies to "fixed", not "fullscreen"
if( this.options.fullscreen ){ return; }
- $el.closest( ".ui-page" ).css( "padding-" + ( header ? "top" : "bottom" ), $el.outerHeight() );
+ tbPage = tbPage || $el.closest( ".ui-page" );
+ $(tbPage).css( "padding-" + ( header ? "top" : "bottom" ), $el.outerHeight() );
},
_useTransition: function( notransition ){

0 comments on commit 45d19d1

Please sign in to comment.