New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when placing a listview inside an ul element #5696

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

Comments

Projects
None yet
2 participants
@oysteinry

oysteinry commented Feb 25, 2013

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

This comment has been minimized.

Show comment
Hide comment
@jaspermdegroot

jaspermdegroot Feb 25, 2013

Member

Related ticket #5643

Member

jaspermdegroot commented Feb 25, 2013

Related ticket #5643

@jaspermdegroot

This comment has been minimized.

Show comment
Hide comment
@jaspermdegroot

jaspermdegroot Feb 25, 2013

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.

Member

jaspermdegroot commented Feb 25, 2013

@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 added a commit that referenced this issue Feb 25, 2013

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".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment