Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…into MauriceG-patch-93
  • Loading branch information...
commit 09925129166a2fa62bb96e3244e82bef26dacdb3 2 parents b0a01a9 + 2dad4d6
@jaspermdegroot jaspermdegroot authored
Showing with 8 additions and 5 deletions.
  1. +8 −5 js/widgets/fixedToolbar.js
View
13 js/widgets/fixedToolbar.js
@@ -124,15 +124,17 @@ define( [ "../jquery", "../jquery.mobile.widget", "../jquery.mobile.core", "../j
}
} )
.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 );
});
}
})
@@ -167,14 +169,15 @@ define( [ "../jquery", "../jquery.mobile.widget", "../jquery.mobile.core", "../j
_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 ){
Please sign in to comment.
Something went wrong with that request. Please try again.