Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

two backward transitions with data-rel='back' in latest #3939

Closed
johnbender opened this Issue · 7 comments

5 participants

@johnbender
< deAtog> Hello everyone. I'm having a problem with page transitions in jQuery Mobile git version.. I've got a link with data-rel="back" that seems to cause two backwards transitions rather than one..

....

< deAtog> johnbender: the app with the issue is here: http://dev.itreetools.org/ellingsd/itree/
< deAtog> if you navigate to Add Tree->Pest and then click on Yes under Tree Stress.. it'll navigate to another page, upon clicking Cancel it'll navigate back to the Pest page, but if you click Yes again then followed by Cancel you end back up at the Add Tree page
< deAtog> sorry.. url should be http://dev.itreetools.org/ellingsd/itree/home.php

...

< deAtog> johnbender: I've only seen the issue on Android.. I can't seem to reproduce the issue on my desktop under Firefox 11
@johnbender

I'm able to reproduce on Android 2.3.

@johnbender

deAtog,

Try disabling pushState with:

$( window ).bind( 'mobileinit', function(){
  $.mobile.pushStateEnabled = false;
});
@deAtog

Disabling pushState corrects this issue on Android 2.2 for me.

@deweller

I encountered a similar problem in Chrome 18/Mac. Setting pushStateEnabled to false corrected the issue for me as well.

@oste

I tried to disable pushStateEnabled but I am still getting the double back button issue on Android 2.3.6

This is the code I used

<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script>
$( window ).bind( 'mobileinit', function(){
    $.mobile.pushStateEnabled = false;
});
</script>
<script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script>

Are there any further updates on this issue?

I also tried

<a href="/" onclick="history.back(-1)" >Back</a>

but this also causes the double back issue...

@oste

It looks like changing 'window' to 'document' seems to work better.

Here is the updated code that works

<script>
$( document ).bind( 'mobileinit', function(){
    $.mobile.pushStateEnabled = false;
});
</script>
@arschmitz
Owner

this is stale for over a and nav has been refactored im going to close this if someone can provide a jsbin test page showing the problem still exists will gladly reopen

@arschmitz arschmitz closed this
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.