-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Opening history ignored in iPhone homescreen webapp #3729
Comments
I have managed to work around this. By using a 20ms delay between each automated page request on the app launching, the history in iphone homescreen mode will update but the home page is still ignored. I can only go back as far as the second automated page but i can measure the window.history.length and add a click event to the back button on the second page to open the homepage instead of going back in history. This works quite acceptably apart from seeing a momentary glimpse of each automated page request as it is pushed into the history. A system to push pages rapidly into the history on app launch would be really useful for when you need to return the user to a page in the app I am using a multi-page template Thanks |
I'm not certain, but I think this may be related to #3190. |
If you could post a sample it would be helpful for seeing the sequence of the callbacks. It doesn't have to use local storage, I'd imagine you could just attempt to load an arbitrary page early in the the even cycle and get the same results (which is, I assume, why @jakeboone02 referenced #3190) |
It was a very complex app so hard to bring down to a basic level but I have noticed in another JQM project that the first page of the site does not register in the history if javascript is automatically pushing the user onto another page, and this was after a short delay. This happened in Safari/iPhone but not Safari/Mac. Will be looking at this again soon so will try to get an example Thanks |
@adriancd Are you still experiencing this with 1.1.0 or latest? Thanks |
Not been working on the app which had this issue so I can't test. Will report if it comes up again. Thanks |
I have the same issue in 1.1.1 it only happens in FireFox. |
Closing this issue because @adriancd hasn't reported it came up again. @reedling78 - If you still have a problem on Firefox, can you open a new ticket and include a test page. Thanks! |
I have a webapp which stores the users data as they progress so that if they click on an external link while in the homescreen app mode on an iphone and leave the app to view a webpage or similar, when they return the webapp will resume at the same position
When the web app reopens, it checks the local storage and calls 2 or 3 pages instantly. This works fine but the back button in homescreen webapp mode will appear and nothing happens when clicked. I can start clicking through pages in the webapp and then the back button will work but the rapidly generated pages at the beginning are ignored
To list the steps:
Homescreen iphone webapp opens
onload called
js checks local storage and creates landing page then 1 or 2 pages immediately using $.mobile.changePage ()
pages are correctly created but user cannot use back button to go back
If the webapp is used in normal safari mode then the back button navigates correctly through these auto generated pages at the start so the problem is only in homescreen mode
I am using 1.0.1 and latest iphone
I have done more tests by listening to the hashchange event. If the app pushes through 2 pages on opening the window.location.hash only changes once in both safari and homescreen mode. but in safari the back button will work and take the user to the previous page
The text was updated successfully, but these errors were encountered: