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...
jaspermdegroot committed Nov 8, 2012
1 parent 15129eb commit 0e3c52347e11c610f80ac0a92699ffeb94215dd1
Showing with 7 additions and 3 deletions.
  1. +7 −3 js/jquery.mobile.fixedToolbar.js
@@ -263,9 +263,13 @@ define( [ "jquery", "./jquery.mobile.widget", "./jquery.mobile.core", "./jquery.
});
},
- 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" );
+ destroy: function() {
+ 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 0e3c523

Please sign in to comment.