Permalink
Browse files

Fixed #2348 - lists-search-with-dividers breaks fixed footer

- Fixed header/footer code now listens for a custom event "contentmodified" on the document to figure out if it should be repositioned or not. Modified collapsible and listview to fire off contentmodified whenever they modify content. Developers can also fire off this event to trigger position updates for fixed headers/footers, so this could be used to address issue #2042 and the mention of collapsible in #2596.
  • Loading branch information...
jblas committed Oct 14, 2011
1 parent 4d35966 commit 773497b5011e39fc102844b86307f1f363ee41a0
Showing with 5 additions and 1 deletion.
  1. +1 −0 js/jquery.mobile.collapsible.js
  2. +1 −1 js/jquery.mobile.fixHeaderFooter.js
  3. +3 −0 js/jquery.mobile.listview.js
@@ -135,6 +135,7 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
.toggleClass( "ui-corner-bottom", isCollapse );
collapsibleContent.toggleClass( "ui-corner-bottom", !isCollapse );
}
+ collapsibleContent.trigger( "contentmodified" );
}
})
.trigger( o.collapsed ? "collapse" : "expand" );
@@ -148,7 +148,7 @@ $.mobile.fixedToolbars = (function() {
stateBefore = null;
});
- $window.bind( "resize", showEventCallback );
+ $window.bind( "resize contentmodified", showEventCallback );
});
// 1. Before page is shown, check for duplicate footer
@@ -106,6 +106,9 @@ $.widget( "mobile.listview", $.mobile.widget, {
.not(".ui-li-icon")
.addClass( "ui-corner-bl" );
}
+ if ( !create ) {
+ this.element.trigger( "contentmodified" );
+ }
},
refresh: function( create ) {

0 comments on commit 773497b

Please sign in to comment.