New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BB5 - mobile.changePage not working on device #1907

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

Comments

Projects
None yet
5 participants
@adambiggs

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?

@jblas

This comment has been minimized.

Show comment
Hide comment
@jblas

jblas Jun 22, 2011

Contributor

@adambiggs

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

  • Kin
Contributor

jblas commented Jun 22, 2011

@adambiggs

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

  • Kin

@ghost ghost assigned jblas Jun 22, 2011

@adambiggs

This comment has been minimized.

Show comment
Hide comment
@adambiggs

adambiggs Jun 22, 2011

@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

@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

@jblas

This comment has been minimized.

Show comment
Hide comment
@jblas

jblas Jun 23, 2011

Contributor

@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.

Contributor

jblas commented Jun 23, 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.

@adambiggs

This comment has been minimized.

Show comment
Hide comment
@adambiggs

adambiggs Jun 23, 2011

@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.

@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.

@jblas

This comment has been minimized.

Show comment
Hide comment
@jblas

jblas Jun 23, 2011

Contributor

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
Contributor

jblas commented Jun 23, 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
@toddparker

This comment has been minimized.

Show comment
Hide comment
@toddparker

toddparker Jun 23, 2011

Contributor

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.

Contributor

toddparker commented Jun 23, 2011

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.

@adambiggs

This comment has been minimized.

Show comment
Hide comment
@adambiggs

adambiggs Jun 23, 2011

@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.

@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.

@toddparker

This comment has been minimized.

Show comment
Hide comment
@toddparker

toddparker Jun 24, 2011

Contributor

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

Contributor

toddparker commented Jun 24, 2011

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

@jblas

This comment has been minimized.

Show comment
Hide comment
@jblas

jblas Jun 27, 2011

Contributor

@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
Contributor

jblas commented Jun 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
@adambiggs

This comment has been minimized.

Show comment
Hide comment
@adambiggs

adambiggs Jun 28, 2011

@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!

@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!

@adambiggs

This comment has been minimized.

Show comment
Hide comment
@adambiggs

adambiggs Jun 29, 2011

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!!

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!!

@adambiggs adambiggs closed this Jun 29, 2011

@jblas

This comment has been minimized.

Show comment
Hide comment
@jblas

jblas Jun 29, 2011

Contributor

Thanks for confirming Adam!

Contributor

jblas commented Jun 29, 2011

Thanks for confirming Adam!

@vivekmago

This comment has been minimized.

Show comment
Hide comment
@vivekmago

vivekmago Jul 5, 2011

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.

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.

@toddparker

This comment has been minimized.

Show comment
Hide comment
@toddparker

toddparker Jul 5, 2011

Contributor

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

Contributor

toddparker commented Jul 5, 2011

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

@vivekmago

This comment has been minimized.

Show comment
Hide comment
@vivekmago

vivekmago Jul 5, 2011

http://jsbin.com/ozoyeh/11

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

http://jsbin.com/ozoyeh/11

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

@vivekmago

This comment has been minimized.

Show comment
Hide comment
@vivekmago

vivekmago Jul 6, 2011

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

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

@jogi

This comment has been minimized.

Show comment
Hide comment
@jogi

jogi Sep 20, 2011

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

jogi commented Sep 20, 2011

@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