From 5918e5ad9f239c83d1a84033b707003ea1b68648 Mon Sep 17 00:00:00 2001 From: vtwoods Date: Wed, 18 May 2011 18:17:41 -0400 Subject: [PATCH] Moved the resize event into the fixed toolbar plugin. --- js/jquery.mobile.collapsible.js | 2 -- js/jquery.mobile.fixHeaderFooter.js | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/jquery.mobile.collapsible.js b/js/jquery.mobile.collapsible.js index a24657d1..9fe60f7d 100644 --- a/js/jquery.mobile.collapsible.js +++ b/js/jquery.mobile.collapsible.js @@ -87,7 +87,6 @@ $.widget( "mobile.collapsible", $.mobile.widget, { .find('a:eq(0), .ui-btn-inner') .addClass('ui-corner-bottom'); } - $(window).trigger('resize'); } }) @@ -106,7 +105,6 @@ $.widget( "mobile.collapsible", $.mobile.widget, { .find('a:eq(0), .ui-btn-inner') .removeClass('ui-corner-bottom'); } - $(window).trigger('resize'); } }) .trigger(o.collapsed ? 'collapse' : 'expand'); diff --git a/js/jquery.mobile.fixHeaderFooter.js b/js/jquery.mobile.fixHeaderFooter.js index 1d2eea0a..27237d9e 100644 --- a/js/jquery.mobile.fixHeaderFooter.js +++ b/js/jquery.mobile.fixHeaderFooter.js @@ -128,8 +128,10 @@ $.fixedToolbars = (function(){ $.fixedToolbars.show(true, this); }); + //When a collapsiable is hidden or shown we need to trigger the fixed toolbar to reposition itself (#1635) + $('.ui-collapsible-contain').live('collapse',showEventCallback); + $('.ui-collapsible-contain').live('expand',showEventCallback); - // element.getBoundingClientRect() is broken in iOS 3.2.1 on the iPad. The // coordinates inside of the rect it returns don't have the page scroll position // factored out of it like the other platforms do. To get around this,