codecomputerlove/PhotoSwipe — Issue #216: Back button issue with jQuery mobile
Author: Sergit
Created: 2011-12-10 13:25:53+00:00
State: open

Hi,

I've been using PhotoSwipe (3.0.4) + jQueryMobile successfully but I have problems with the back button:

I have my gallery 4 levels deep in my app (each page in a separate html file):

Root_page -> Page_1 -> Page_2 -> Gallery

If I press the back button from Gallery it goes to Page_2 as expected, and I can go from Page_2 to Gallery back and forth without problems.

The problems start if I go back to Page_1 and come back to the Gallery:
Root_page -> Page_1 -> Page_2 -> Gallery: (press back button, go to Page_2)
Root_page -> Page_1 -> Page_2: (press back button, go to Page_1)
Root_page -> Page_1: (go to Page_2)
Root_page -> Page_1 -> Page_2: (go to Gallery)
Root_page -> Page_1 -> Page_2 -> Gallery

In this situation, Gallery's back button seems to do nothing but if I press it twice I go back to Page_1 skipping Page_2.
If I come back to Root_Page then I have to hit the Gallery's back button three times and it brings me to the Root_Page skipping pages 1 and 2.

Tested in Safari and Phonegap 1.2.0.

Thanks for the help!