olivernn / davis.js

RESTful degradable JavaScript routing using pushState
http://davisjs.com
532 stars 58 forks source link

iOS - First link fires correct push state, the rest fail #41

Closed TomSlezakowski closed 12 years ago

TomSlezakowski commented 12 years ago

Hey!

After playing around with Davis in one of your other projects I decided to use it on a new project from the outset, however I am experiencing a problem with iOS devices. I've tested this on iPhone 4 and iPad 3.

Davis correctly runs and attaches itself to links, when I click a routed link, the push state happens and all is well, however all subsequent links do not fire and no change of state happens.

It's relatively barebones so far so this is really all the code I can provide :)


var app = Davis(function() {

    this.use(Davis.googleAnalytics);

    this.get('/game/:game_id', function (req) {
        console.log("@ section " + req.params['game_id']);
    });

});

app.start();
TomSlezakowski commented 12 years ago

Hmm. Sorry. Nothing to do with Davis at all. Everything to do with buggy Safari. Apologies! :D

olivernn commented 12 years ago

No worries, is this a bug with mobile Safari's pushState handling? In older versions it did have a few bugs, however I thought these had been fixed in the latest versions.