jquery-archive / jquery-mobile

jQuery Mobile Framework
https://jquerymobile.com
Other
9.7k stars 2.41k forks source link

Can't revisit the same page after visiting it, hitting the back button and clicking its link #1207

Closed jblas closed 13 years ago

jblas commented 13 years ago

This is a bug that only happens if you navigate from the default document page, to any other page:

  1. Load a jqm document.
  2. Click on a link to visit another jqm page.
  3. Hit the back button.
  4. Click on the same link.

When you get to step 4, nothing happens because the internal state thinks it is still on the page you just visited. This is a regression caused by:

https://github.com/jquery/jquery-mobile/commit/20dce2ce4294c4036ed057902d7f02c3c3086b4a

We need to revert the logic so that it can tell the difference between a "not-found" and zero.

jblas commented 13 years ago

I checked in a fix for this:

https://github.com/jquery/jquery-mobile/commit/ea77d0370d8c51a0003f2416b3cd4055d1995fba

I still need to make sure the navigation unit tests covert this case.

hakanson commented 13 years ago

This might also fix my issue jquery/jquery-mobile#1165

jblas commented 13 years ago

@hakanson

Thanks for the duplicate pointer. I'll go ahead and close that bug. I'm keeping this one open until after I add a unit test for it.

hakanson commented 13 years ago

Maybe you can update the mutipage-template.html (referenced in my bug) and use that in your test? Thanks for the fix. This was a blocker for me on my project.