Possible bug when refreshing list view
Take one list item containing an anchor - possibly cloned from a hidden list you made earlier.
Add this list item to another list and call .listview('refresh') on the list to update the layout.
The layout of the list item breaks - the padding increases.
The same thing can be simulated by calling .listview('refresh', true) on a list that already contains a list item with an anchor.
The class ui-li-static is being added to both list item and its inner div. If this class should be there for the layout it should probably have been added when the list was first enhanced.
Attached is a working demo of this effect.
Please I hope I am wrong and this is a my misunderstanding - if so I would welcome some advice.
Either way a work around would be good.
Many thanks for Jquery Mobile - which is generally brilliant.
---- update -----
So it only occurs if you call viewlist('refresh') on an item that has already been enhanced and contains a <a /> tag. i.e. you have copied it from another list or you are calling viewlist('refresh', true) and so doing a whole list.
My work around is to stop using hidden template chunks of html and instead to generate the html in code and call viewlist('refresh') so it only effects the new (non-enhanced) stuff from code. An alternative would be to mark these templates as not to be enhanced in the first pass but I understand there is a performance hit for that.
I still think this is an issue that might need looking at.
Thanks,
Roger