Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Listview breaks when used without .ui-page #5429

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

Listview breaks when used without .ui-page #5429

jzaefferer opened this issue Jan 9, 2013 · 3 comments

Comments

@jzaefferer
Copy link
Contributor

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.

@jaspermdegroot
Copy link
Contributor

@jzaefferer

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

@jzaefferer
Copy link
Contributor Author

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.

@jaspermdegroot
Copy link
Contributor

Closing as fixed by commit 4973827.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants