senchalabs / jQTouch

Create powerful mobile apps with just HTML, CSS, and Zepto.js (or jQuery).
http://www.jqtouch.com/
MIT License
2.78k stars 589 forks source link

Back button returns to #home #509

Open Orange06 opened 10 years ago

Orange06 commented 10 years ago

Using back button on ajax inserted page makes the site go back to home, no mather howmany pages are in between #home and #last-page, it allways goes back to #home. I saw this issue reported few years ago and there is no answer on that ? the html looks like this: div id="jqt"> div id="home"> a href="#list">Go to list /div>

div id="list"> (The content is added when "go to list" link is tapped) a href="#page1"> Page1

a href="#page2"> Page2
a href="#page3"> Page3 /div>

and after #page1 is tapped, ajax again appends

to #jqt.

div id="page1">BACK

/div> And when I tap the "BACK" it goes straight back to #home.

Has anyone found a solution for this problem ?

I also noticed that if we set useFastTouch to true, a ghost tap appears. I tested this on iOS 7 - iphone.

Another issue I see is when I get data back from ajax, they are insreted to page 2 times. I've checked everything more than 3 times and I don't call that function twice, funny thing is that in FireForx it is inserted normaly, but when I check on iPhone, the list is doubled. I'm building my page(app) with help of the demos like @thomasyip has sudgested me, but there are still issues.