Permalink
Browse files

Merge pull request #5262 from arschmitz/issue-5261

fixedToolbar: added logic to set page padding back to 0 on destroy. Fixe...
  • Loading branch information...
1 parent fc15e83 commit e59b5f2fa6217881ca5128c73b8c5c4b67ca2f2b @jaspermdegroot jaspermdegroot committed with jaspermdegroot Nov 8, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 js/widgets/fixedToolbar.js
@@ -255,8 +255,12 @@ define( [ "jquery", "../jquery.mobile.widget", "../jquery.mobile.core", "../jque
},
destroy: function() {
- this.element.removeClass( "ui-header-fixed ui-footer-fixed ui-header-fullscreen ui-footer-fullscreen in out fade slidedown slideup ui-fixed-hidden" );
- this.element.closest( ".ui-page" ).removeClass( "ui-page-header-fixed ui-page-footer-fixed ui-page-header-fullscreen ui-page-footer-fullscreen" );
+ var $el = this.element,
+ header = $el.is( ".ui-header" );
+
+ $el.closest( ".ui-page" ).css( "padding-" + ( header ? "top" : "bottom" ), "" );
+ $el.removeClass( "ui-header-fixed ui-footer-fixed ui-header-fullscreen ui-footer-fullscreen in out fade slidedown slideup ui-fixed-hidden" );
+ $el.closest( ".ui-page" ).removeClass( "ui-page-header-fixed ui-page-footer-fixed ui-page-header-fullscreen ui-page-footer-fullscreen" );
}
});

0 comments on commit e59b5f2

Please sign in to comment.