Closed aymanfarhat closed 11 years ago
Hi @aymanfarhat, I'm aware of this issue and has fixed it in the current wip version. The fix was adding event.preventDefault()
to tabs.js
. Please have a look at this commit: https://github.com/jaunesarmiento/fries/commit/03bf6a3de062618f0378288a307c1ecddbf01508
The issue was caused by tabs.js
appending the #href
to the address bar, causing stack.js
to pop these first.
What I find weird is that the fix works fine when testing on the browser yet doesn't work in Phonegap
EDIT:
It still didn't work on Phonegap so I ended up with a workaround(temporary) where for each hyperlink of a tab I added onClick="retun false" in order to prevent propagation and the pushing of the hashbang page into history. preventDefault for the touchend on the window didn't cut it, although it does on chrome which is baffling.
Won't event.stopPropagation()
work? Maybe call it after calling event.preventDefault()
?
I can confirm that calling e.stopPropagation() before or after preventDefault() isnt really making any difference.
That is really odd. I really can't work on it at the moment due to the lack of an Android phone. I will however be able to buy one within the week. You can try to find a solution to this if it's not too much to ask from you.
Yes definitely I'll look again into it when I have time and report back.
Great, thanks @aymanfarhat! :)
Oops, forgot to close this issue. This is already fixed in the wip-1.0.1
branch.
I have a page that I am opening via stack.js which has some tabs in it. I added a back button for the page which would execute window.history.go(-1); to go back to index.html.
The problem is that, the user would have to click so many times on the back button to make it go back within a stack.js page which has tabs, after navigating through them. This is because the back button would be going back through the previously viewed tabs on the page before going back to index.html
I could have directly linked back to index.html but I have dynamically loaded data there which I don't want to lose.
Haven't come up with a fix for this yet, looking for a simple workaround first.