Oliver Fisk
Posts: 0
Joined: Wed Jul 09, 2014 10:02 pm

Back button: iOS issues

I've created a back button in my app.

It works fine in web browsers and when deployed as an android app but when used in Safari on iOS or through the appery testing app nothing happens.

I have used both:
history.back();
window.history.back();

but neither of them work on iOS.

Any suggestions?

Jaime Vergara
Posts: 0
Joined: Thu Feb 05, 2015 11:52 pm

Back button: iOS issues

I have the same problem. I did try this link but does not work

http://stackoverflow.com/questions/32...

I waiting for answer..

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Back button: iOS issues

Hi all -

Thanks for letting us know, it looks like a Cordova issue we have reported this to our development team.

Ideal APP
Posts: 0
Joined: Thu Feb 11, 2016 12:18 pm

Back button: iOS issues

Hi Illya,

I am facing the same issue. do you have any solution/workaround for this ?

thanks

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Back button: iOS issues

Hello,

Unfortunately not yet, we're still working on this issue.

Ideal APP
Posts: 0
Joined: Thu Feb 11, 2016 12:18 pm

Back button: iOS issues

I would like to suggest a build in solution:
If you will save to local storage the page name before hide, you will be able to nevigate to it (instead of history.back()).

This event show the previous page name before hide:
$(document).on("pagebeforehide",function(event, data){
alert(data.prevPage.attr('id'));
});

If you will add new item called: "Previous page" on navigate to page event, so you will be able to navigate to the saved page from local storage. it will solved this issue.

What do you think ?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Back button: iOS issues

Hi all,

This is to share an update on this topic.

In overall it's not a good practice to use codehistory.back()/code in jQuery Mobile projects.
In jQuery Mobile it is better to use code$.mobile.back()/code instead of web API codehistory.back()/code

The method code$.mobile.back()/code works fine both in a browser within jQuery Mobile app and in a hybrid app.

Ideal APP
Posts: 0
Joined: Thu Feb 11, 2016 12:18 pm

Back button: iOS issues

Thank you Illya.

Return to “Issues”