Crash when placing a listview inside an ul element #5696

Closed
oysteinry opened this Issue Feb 25, 2013 · 2 comments

Projects

None yet

2 participants

@oysteinry

When a listview is placed inside an ul element jquery mobile 1.3 crashes on
if ( !listview.options.filter )
Since the listview object does not exists.

Test page: http://jsbin.com/ukewu3/318

Tested on Chrome, Opera. using jquery mobile 1.3 and latest with jquery 1.9.1.

Changing:
if ( !listview.options.filter ) {
return;
}
Into:
if ( !listview || !listview.options || !listview.options.filter ) {
return;
}
Appears to solve the problem.

@jaspermdegroot
Member

Related ticket #5643

@jaspermdegroot
Member

@oysteinry

Thanks for reporting the issue. See the script in the head of this JS Bin test page how you can resolve the problem for now: http://jsbin.com/ukewu3/321/edit
It will be fixed in 1.3.1.

@jaspermdegroot jaspermdegroot added a commit that closed this issue Feb 25, 2013
@jaspermdegroot jaspermdegroot Listview filter: Check if var listview is defined. Fixes #5696 and #5643


The listviewcreate event bubbles up which causes an error if a listview is nested in an UL or OL without data-role="listview".
1e88b3b
@jaspermdegroot jaspermdegroot added a commit that referenced this issue Feb 25, 2013
@jaspermdegroot jaspermdegroot Listview filter: Check if var listview is defined. Fixes #5696 and #5643


The listviewcreate event bubbles up which causes an error if a listview is nested in an UL or OL without data-role="listview".
c92a2bd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment