Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
BB5 - mobile.changePage not working on device #1907
I've run into a pretty big issue on my BB5 test device (9000 running v22.214.171.1240) using 1.0b1.
My app uses a single index.html file with all the pages inside, and I change pages using IDs like:
I'm using a lot of ajax to populate data in the app so I'm also hijacking links by setting href="#" and then manually changing pages in JS like:
Both these methods work totally fine in the BB5 simulators, but when I load the app onto my device, it just sits there and does nothing. I can step through my code with alerts and see that all my ajax calls and everything else is working fine, but as soon as it gets to a $.mobile.changePage call, it simply does nothing.
Page transitions are working fine between separate html files, but not working between pages embedded in the same html file.
This is incredibly hard to debug without being able to see error messages from the device. Has anyone else run into this issue or does anyone else have a different BB5 test device to try this on?
I'm not sure if this is related or not, because it didn't seem to make a difference at all for me in any of the browsers I tried with your sample, for Beta 1 we turned off ajax handling for BB5 and Opera Mini.
I tried modifying your sample:
To turn off ajax handling and I didn't see any difference. Do you see a difference if you enable it?
Sorry, I'm just guessing here since I don't have a BB5 device. I've pinged Scott and Todd though.
I just tested the multi-page boilerplate template on our 9930 Curve (BB5) and it is broken. Clicking on a link does nothing in a multi-page doc under BB5 but the same page works fine in Opera Mini which also has Ajax disabled.
The issue I see is that even if the multi-page worked in BB5, the back button won't work so this is far from ideal. If you're building specifically for BB5 I wouldn't recommend using a multipage approach. We'll look into this but it's not a top priority.
Glad I could be useful!
I haven't had a chance to test this in my app yet, but I just checked the test site and http://jquerymobile.com/test/docs/pages/multipage-template.html is now working on my BB5 device!
I'll let you know if it's also working on PhoneGap.