mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-14 09:33:09 +00:00
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.
This commit is contained in:
parent
4d35966e69
commit
773497b501
3 changed files with 5 additions and 1 deletions
|
|
@ -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 ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue