I’m having a really weird issue with some content that is being inserted with ajax within a pageinit event.

Here is the method:
populateBusRoutesList : function() {
var list = $('ul#bus-routes-list'), content = '';
$.each(BuSeViCi.busRoutes, function(i, route){
content += '<li>' +
'<a href="#" class="view-stops" data-number="'+ route.number+'">' +
'<img src="'+ route.img +'">' +
'<h3 class="ui-li-stops">'+ route.name +'</h3>'+
'</a></li>';
});
$(content).appendTo(list);
list.listview('refresh');
list.trigger('updatelayout');
}
The updatelayout trigger has no effect in code but I just was trying to solve the weird behaviour. I’ve noticed that if I resize the browser, the problem get’s solved.
Does anyones know why this happens?
Seems to be a bug in jQM – github.com/jquery/jquery-mobile/issues/4219
It should be fixed for the next release