Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQM/PhoneGap: Navigation started when state=1 bug?

I've overcome a frustrating problem with jQuery Mobile only to run into another one. Here's the story: I'm using $.mobile.changePage() as shown:

<script type="text/javascript">
$(document).on('click', '#submitroll', function(e) {
    e.preventDefault();
    var dieRoll = $("#dieresult").val();

    $.mobile.changePage('valueresult.html', {
        data: {
                arg1: dieRoll
        }
    });
});
</script>

When I click on the button (#submitroll), it doesn't transition to the valueresult.html page (which resides in the same directory as the origin page). Instead, the console output produces the following error:

Failed to load webpage with error: CDVWebViewDelegate: Navigation started when state=1

I searched on that error and found many results, most of them referring to a bug in PhoneGap 2.7. I happened to be running PhoneGap 2.8.1, so I figured/hoped that was the issue. I noticed PhoneGap 2.9rc1 available (which, according to the release notes, includes a fix to that particular bug), so I installed 2.9rc1 just to see if it would fix the problem.... and it didn't.

But before I inform the PhoneGap folks, I want to rule out the (strong) possibility that I'm doing something wrong.

I'm running jQuery 1.10.1 and jQuery Mobile 1.3.1, currently building/testing on iOS 6.1. If anyone has any suggestions on how to proceed, that would be great. Thanks in advance!

like image 297
mrbranden Avatar asked Nov 13 '22 02:11

mrbranden


1 Answers

For everyones interest! Maybe the only reasy why this error appears is, becaus the new loaded page maybe produces some javascript errors!

like image 151
Erhard Dinhobl Avatar answered Nov 15 '22 05:11

Erhard Dinhobl