Photoswipe messes up jQM paths #4533

Closed
firedev opened this Issue Jun 16, 2012 · 10 comments

4 participants

@firedev

We use jquery to build a mobile gallery and all links look like this "?/pictures1" "?/contact" etc. After going back and forth the paths start to pile up in the address bar like this:

/?/#/?/pictures1/

Update: The issues is actually cause by photoswipe library and probably is IN the photoswipe. https://github.com/codecomputerlove/PhotoSwipe

@jaspermdegroot
jQuery Foundation member

@firedev - We need a little bit more information. See https://github.com/jquery/jquery-mobile#issues
Also, does "sometimes" mean random or can you describe when it happens and when not?

@firedev

Unfortunately it's just random, happens sometimes after going back and forth. I will try to look after it a bit closer. We're always using the cutting edge jquery-mobile from GitHub and there are less and less issues every time I update. Just downloaded the new release, will let you know. Thanks!

The platform is iOS5, the link is http://imagevuex.com/demo/x2?mobile=1

@firedev

Ok here it is, I go to http://imagevuex.com/demo/x2 on iPad,
Tap the first link in the list "Fancy album", it goes to http://imagevuex.com/demo/x2/?/Fancy -- this is correct
Tap the Back arrow in the header toolbar on the page, it goes to http://imagevuex.com/demo/x2/?/ -- this is correct
Tap Fancy album again... and I am on http://imagevuex.com/demo/x2/?/#/demo/x2/?/Fancy -- this is wrong

The URL should be http://imagevuex.com/demo/x2/?/Fancy. All the links on the page are similar (i.e. href="?/Fancy" "?/" etc.)

@agcolom
jQuery Foundation member

@firedev I've tried your example... I get the correct page displayed...

The URL issue can be fixed by using data-rel="external" or disabling AJAX navigation, see details http://jquerymobile.com/demos/1.1.0/docs/pages/page-navmodel.html

Does this solve it for you?

edit: which version of JQM are you using?

@firedev

I use the today's version from GitHub. We can't disable AJAX navigation as this is exactly why we use jQuery Mobile. Got to say that it works fine in Google Chrome. The issue is only on mobile devices.

@Wilto

Hey @firedev,

We’re looking into this issue, but in the meantime: would it be possible to put together a reduced test case at http://jsbin.com/omacox/edit? I know there’s a back-end component in play here as far as the ? URLs go, so maybe you could put together a few simple pages that use that URL scheme and link to one another, so we could have a look at that?

Thanks!

@firedev

I got to take a nap first. Will see what I can do tomorrow. Thanks for looking into it!

@Wilto

Also, be sure to test this issue against http://code.jquery.com/mobile/latest/, just to be certain the issue hasn’t been addressed in the current code. (The links to all the files on /latest are in that jsbin link above.)

@firedev

After some testing I found the culprit, it's the Photoswipe, even their demo exhibits the same behaviour on the iOS:

http://www.photoswipe.com/latest/examples/05-jquery-mobile-ajax.html

Now I see this is not a problem related directly to JQM, but if anybody can hint on ways of fixing this, or has any suggestions where to look at least, it is very much appreciated.

@jaspermdegroot
jQuery Foundation member

@firedev

Thanks for reporting back.
I suggest to post your question on the JQM forum (https://forum.jquery.com/jquery-mobile) and/or Apple's developer forums https://discussions.apple.com/community/developer_forums

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment