For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 6 replies, 2 voices, and was last updated 14 years, 6 months ago by
SonamGyato.
-
AuthorPosts
-
SonamGyatoMemberWayne,
As you know, I’ve got an an that navigates to an external site and from that
page i call javascript window.history.back() – to get back to the last mobi page.In my app, the user can navigate to pages that are nested about 3 deep before
the call to the external site…soA >> B >> C >> external site.
Ideally, on pressing BACK – i would like to go to C.
But with the latest version 1.4.1
I can a call to documentReadyHandler() – which initializes the app and then
post transition for C.Since I don’t have all the interim state variables set (because of the documentReadyhandler()
call) – the page doesn’t look right.I wouldn’t mind if on pressing back() – the main app was initialized and that’s it –
that is back to the start page.is this possible?
can i edit something in the phonueui.js file – for this behavior.
thanks.
February 10, 2012 at 5:49 am #323183
support-michaelKeymasterWe have been discussing the event callback sequence. Our proposal is to normalize events for a back navigation as follows:
0) cache pages including DOM in history for quick load
1) documentReadyHander() – not called
2) postTransition() – calledDoes this work for your UI flow to remote doc and then back into your mobione webapp?
February 10, 2012 at 6:22 am #323187
SonamGyatoMemberI believe when a webapp is run, the custom.js file get’s loaded once.
all the page navigations within the app are just animations within the
same same webapp page – i.e. any global state variables within the custom.js
file is maintained during transitions.So when i navigate from page #A to #B (for example on selecting an item from
a list) – i store the list item index in a variable and i can retrieve it in the
posttransition for B and display the appropriate details in #B for the correct index.I think the overall problem is that when i do a window.history.back() from my
external site to get back to the webapp, safari will load the webapp again and
the state variables are gone!You can simulate my scenario this way:
1. display a webapp and on transition to the next page – modify a global variable.
2. in the transition-to page, alert() display the variable and also provide a button
to transition to an external web-page.3. on that page have a button that has “window.history.back()” linked to it.
now when it goes back to the app.
it should display the transition-to page and alert() the correct state variable.
if that doesn’t work – i can settle with just a webapp init and display the main
page.thanks.
February 10, 2012 at 6:49 am #323189
support-michaelKeymasterWe are investigating the inconsistencies between how mobile safari and the test center browser behave when navigating back in history. It seems default browser behavior varies by vendor and version… 🙁 We are working to determine a simple consistent model. Will share more asap.
February 10, 2012 at 7:31 am #323194
SonamGyatoMembershouldn’t we just be concerned with Safari browser.
Since the webapp itself works best with it and also it’s
the default browser with the iphone.February 10, 2012 at 7:57 am #323198
support-michaelKeymaster>shouldn’t we just be concerned with Safari browser.
As I stated we are looking into diffs between mobile safari and test center as they behave differently. Same for safari and mobile safari. There is no consistency across any browser and version so atm it is a little challenging to say the least.
February 10, 2012 at 1:16 pm #323208
SonamGyatoMemberright now the code on pressing BACK – i get documentReadyHandler()
and then post-transition on the last used page.is there any way to short-circuit this and stop at the documentReadyHandler()
call.if there’s something i can do in the phoneui.js file – i’d be happy with that
solution.thanks.
-
AuthorPosts
