Listview breaks when used without .ui-page #5429

Closed
jzaefferer opened this Issue Jan 9, 2013 · 3 comments

Comments

Projects
None yet
2 participants
Owner

jzaefferer commented Jan 9, 2013

Trying to use the listview widget standalone, I'm getting an exception in the _createSubPages method, where it looks for parentList.closest( ".ui-page" ), then access the first item of that without ever checking if it actually found anything. Since in my case there is no parent page, it throws a something-something is undefined exception.

If someone tells me how to put together a jsfiddle/jsbin with a custom build, I'd do that. But it should be really easy to reproduce anyway. Just load listview and its dependencies on a page, add a <ul> and call .listview() on that.

Member

jaspermdegroot commented Jan 9, 2013

@jzaefferer

We are aware of this. It's on the roadmap for 1.4 to make all widgets work outside a page as well.

Owner

jzaefferer commented Jan 9, 2013

Good, that's something. Is there a feature ticket or something that could replace this?

Either way, I managed to get the listview initialized by adding a <div class="ui-page"> as a parent element. Removing that class after initializing the listview even makes the listview visible.

Member

jaspermdegroot commented Jun 13, 2013

Closing as fixed by commit 4973827.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment