iOS9 Beta: History.go(-1) does not work

Plateform and Version : iOS9 Beta

Device: All iPhone


DESCRIPTION OF PROBLEM:

When we navigate from one page to other page then back button are not working as expected.


We are using History.go(-1) to navigate to previous page but this stopped working after upgrading to iOS9 Beta.


We have some input fields (drop down/input text boxes to select value) on page-2.


Once we successfully login to app then it goes to page-1 and we have multiple taps on this page to go to next pages. so once we tap and to user will be redirected to page-2 and then on page-2 we have multiple drop downs and once click on that drop down will pop up with items, and once we select any value from the drop down control goes back to page-2, but after installing iOS9 after selecting value from the drop down it does not goes back to page-2.



STEPS TO REPRODUCE

1) Sign to app and user will be navigated to Page-1(Home page).


2) tap on the order and user will be navigated to page-2(Order page)


3)click on the account drop down to select account on page-2, drop down will pop up with list of account numbers.


4) Select the account number.


expected behaviour was user will be navigated back to page-2(order page) but once we select account nothing happens.



Here is the code that we use to go back to previous page once select item from the drop down.

view.prototype.rowSelectedAt = function(index) {

var selection = {

value: this.rows[index]

};

this.publish('onModalSelection', selection);

this.modalSelectionDelegate.onModalSelection(selection);

history.go(-1);

};

It looks like this is a new "feature" from Apple. They have added a security feature to the IOS9 browser that prevents a script from manipulating the window.history so malicious scripts can't change the history of pages visited:

http://stackoverflow.com/questions/21625126/window-history-go-1-not-working-in-ios-homescreen-app


Unfortunately many of the fixes are ugly - basically tracking your own history as you go.


Brad

for jQuery Mobile below solution worked for me


<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script> <script type="text/javascript"></script> 
<script type="text/javascript">
$(document).bind("mobileinit", function(){ $.mobile.hashListeningEnabled = false; }); 
</script> 
<script type="text/javascript" charset="utf-8" src="js/jquery.mobile-1.4.5.js"></script>


from stackoverflow question

http://stackoverflow.com/questions/32187431/problems-with-window-history-using-jquery-javascript-on-cordova-app-in-ios9/32531481#32531481

iOS9 Beta: History.go(-1) does not work
 
 
Q