Skip to content
This repository
Browse code

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

…into MauriceG-patch-93
  • Loading branch information...
commit 09925129166a2fa62bb96e3244e82bef26dacdb3 2 parents b0a01a9 + 2dad4d6
Jasper de Groot authored June 15, 2012

Showing 1 changed file with 8 additions and 5 deletions. Show diff stats Hide diff stats

  1. 13  js/widgets/fixedToolbar.js
13  js/widgets/fixedToolbar.js
@@ -124,15 +124,17 @@ define( [ "../jquery", "../jquery.mobile.widget", "../jquery.mobile.core", "../j
124 124
 					}
125 125
 				} )
126 126
 				.bind( "webkitAnimationStart animationstart updatelayout", function(){
  127
+					var thisPage = this;
127 128
 					if( o.updatePagePadding ){
128  
-						self.updatePagePadding();
  129
+						self.updatePagePadding( thisPage );
129 130
 					}
130 131
 				})
131 132
 				.bind( "pageshow", function(){
132  
-					self.updatePagePadding();
  133
+					var thisPage = this;
133 134
 					if( o.updatePagePadding ){
  135
+						self.updatePagePadding( thisPage );
134 136
 						$( window ).bind( "throttledresize." + self.widgetName, function(){
135  
-							self.updatePagePadding();
  137
+						 	self.updatePagePadding( thisPage );
136 138
 						});
137 139
 					}
138 140
 				})
@@ -167,14 +169,15 @@ define( [ "../jquery", "../jquery.mobile.widget", "../jquery.mobile.core", "../j
167 169
 		_visible: true,
168 170
 
169 171
 		// This will set the content element's top or bottom padding equal to the toolbar's height
170  
-		updatePagePadding: function() {
  172
+		updatePagePadding: function( tbPage ) {
171 173
 			var $el = this.element,
172 174
 				header = $el.is( ".ui-header" );
173 175
 
174 176
 			// This behavior only applies to "fixed", not "fullscreen"
175 177
 			if( this.options.fullscreen ){ return; }
176 178
 
177  
-			$el.closest( ".ui-page" ).css( "padding-" + ( header ? "top" : "bottom" ), $el.outerHeight() );
  179
+			tbPage = tbPage || $el.closest( ".ui-page" );
  180
+			$(tbPage).css( "padding-" + ( header ? "top" : "bottom" ), $el.outerHeight() );
178 181
 		},
179 182
 
180 183
 		_useTransition: function( notransition ){

0 notes on commit 0992512

Please sign in to comment.
Something went wrong with that request. Please try again.