From fd738c5b045a12ab17ed0c2db4b1d34e2f5e2d6b Mon Sep 17 00:00:00 2001 From: scottjehl Date: Fri, 17 Jun 2011 00:21:11 -0400 Subject: [PATCH] Modified the listview thumbail-finding logic to specifically find first children of the li or the primary button's inner anchor element. Fixes #1794. Fixes #1458 --- js/jquery.mobile.listview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.mobile.listview.js b/js/jquery.mobile.listview.js index cd7600fb..2c9e389f 100644 --- a/js/jquery.mobile.listview.js +++ b/js/jquery.mobile.listview.js @@ -38,7 +38,7 @@ $.widget( "mobile.listview", $.mobile.widget, { .addClass( "ui-btn-up-" + ($list.jqmData( "counttheme" ) || this.options.countTheme) + " ui-btn-corner-all" ).end() .find( "h1, h2, h3, h4, h5, h6" ).addClass( "ui-li-heading" ).end() .find( "p, dl" ).addClass( "ui-li-desc" ).end() - .find("img:first-child:eq(0)").addClass( "ui-li-thumb" ).each(function() { + .find( ">img:eq(0), .ui-link-inherit>img:eq(0)" ).addClass( "ui-li-thumb" ).each(function() { item.addClass( $(this).is( ".ui-li-icon" ) ? "ui-li-has-icon" : "ui-li-has-thumb" ); }).end() .find( ".ui-li-aside" ).each(function() {