jquery/jquery-mobile — Issue #3037: listview refresh issue
Author: bezelmezel
Created: 2011-11-13 18:03:23+00:00
State: open

Hello,

Looks like I faced a possible bug with listviews when I try to updated an existing view element item (text for example).
Here is the sample list I have (regular unsorted one with data-filter turned on):

some text

some other text

After that I use JavaScript to update "m_buddyStatus" html text and refresh the list like that:

$('#m_buddyStatus').html('new text');
$('#contactListView').listview('refresh');

It produces a problem. Basically visible text is not changed unless you mouse over this list item or scroll the page or do something else on the page.

But what is interesting is that removing data-filter="true" from the list definition solves the problem and it works as required.
Even more - if I keep data-filter="true", but replace "ul" with "ol" tags instead, it works too!

My wild guess is that .listview('refresh') does not handle this case somewhere and I hope you can help me to solve it.
If there is any workaround to trigger a refresh for list view content (because mouse over or list scroll update the text) - please let me know.

Thanks!