Skip to content
This repository

BB5 - mobile.changePage not working on device #1907

Closed
adambiggs opened this Issue June 22, 2011 · 17 comments

5 participants

Adam Biggs Kin Blas Todd Parker vivekmago Vashishtha Jogi
Adam Biggs

I've run into a pretty big issue on my BB5 test device (9000 running v5.0.0.900) using 1.0b1.

My app uses a single index.html file with all the pages inside, and I change pages using IDs like:

<a href="#page-id">

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:

$('#link-id').bind('tap', function(){
    // do stuff here
    $.mobile.changePage('#page-id');
});

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?

Kin Blas
jblas commented June 22, 2011

@adambiggs

If you can push a sample somewhere I can take a look.

  • Kin
Adam Biggs

@jblas

Here's a test in jsbin:

http://jsbin.com/ukewu3/83

Again this works fine in the simulator, but doesn't do anything on my device... so strange

Kin Blas
jblas commented June 22, 2011

@adambiggs

So the example, as is, does not work on your device? I noticed it isn't doing anything special, like the tap snippet you mentioned above.

Maybe I can poke Scott or Todd, who have a BB 5 device to give it a try.

Adam Biggs

@jblas

Ya on my test device the button doesn't transition to page 2 but in the simulator it works fine.

FYI in my app code the transition is set to 'none' and it still doesn't work.

Kin Blas
jblas commented June 22, 2011

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:

http://jsbin.com/ukewu3/86

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.

  • Kin
Todd Parker

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.

Adam Biggs

@toddparker

Do you have any clues about what might be causing this? I'd rather not have to rewrite my whole app for BB5 if I can implement a hack somewhere to fix it temporarily till this gets addressed.

Todd Parker

Just heard back that Kin is working on tracking down the cause of this problem so stay tuned.

Kin Blas
jblas commented June 27, 2011

@adambiggs

The regexp workaround just hit the HEAD:

aff87cc

Should appear in today's nightly ... I'm still not sure this will fix the problem for you or not. Let me know either way. And a big thank you for testing all 33 iterations on your BB5 device. I wouldn't have figured it out otherwise.

  • Kin
Adam Biggs

@jblas

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.

Cheers!

Adam Biggs

I just tested this some more and I can confirm this is working in my app in PhoneGap as well. Great work Kin! My app is now running in BB5!!

Adam Biggs adambiggs closed this June 29, 2011
Kin Blas
jblas commented June 29, 2011

Thanks for confirming Adam!

vivekmago

This seems to break still on BB5 if there is a script tag in the page that is being transitioned too... Would appreciate if you could test and confirm the bug and reopen.

Todd Parker

@vivekmago - Cna you post a test page on JSBin using the latest so we can test on our end?

vivekmago

http://jsbin.com/ozoyeh/11

Please try this on BB5 as it will work on the rest in my testing

vivekmago

pls ignore I think my issue might be bcos of ill formed html

Vashishtha Jogi

@vivekmago What was the error? I am having a similar issue and I have still not figured out the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.