App unexpectedly navigating back to first page on its own, out of ideas

App unexpectedly navigating back to first page on its own, out of ideas

I am building an app in phonegap using jquery mobile.

It's a single page app, using data-role="page" and id="whatever" for each page (just examples, each id is unique of course).

To change pages in the app, I'm doing it like so (note that transitions have been set to none globally in case that was a possible cause). The app has some dynamically loaded pages, and sometimes a page needs to be changed after an action of some sort takes place:

$(":mobile-pagecontainer").pagecontainer("change", "#search-page");

For some reason when using the app, going from page to page, the app will randomly go back to the homepage/first page without me clicking anything at all. I can navigate around find, everything else seems to work, but if I go to even one other page in the app, let it sit there for a moment (time seems to be random on it), don't touch anything... it always invariably goes back to the first page. It takes a while to happen for me, but the client is having this happen on his device frequently (both testing on adroid right now).

I've been on this for over a day now, and I'm completely out of ideas :-(