I am having a problem with an application I am writing in jquery mobile and phonegap. While testing in the browser, I had no problems using the back button (no phonegap js involved). However once I try on a device with the phonegap js it breaks.
Steps to reproduce:
- Load app
- Visit several pages (linked internally using #)
- Click the back button or call history.back() from anywhere (using the js console, or by triggering something that calls it)
On the browser (chromium, firefox etc), it goes back one 'page' (to the previous # link whatever it was). This is the preferred behaviour.
On the device (iPhone 4, iPhone simulator, Android 2.2 (device), Android 3.2 (device)), it goes to the first/landing page (the first 'page' in the index.html file).
I suspect that the problem is with phonegap. Is there a way to revert to the preferred behaviour or the browser?