PaulKinlan / io-reader

Apache License 2.0
2 stars 0 forks source link

Route matching for article doesn't work in Safari on window.onload #41

Closed ebidel closed 13 years ago

ebidel commented 13 years ago

Using webkit nightly, refresh page when viewing an article (e.g. articleState is on). window.onload isn't matching the route/regex for an article in Safari (and therefore ipad), and the app.get("^/reader/:category/:article", onArticleChanged); callback isn't called. So, menuState is never changed to articleState.

Everything is peachy if I'm not refreshing on the article (and rather navigating through the app). This only occurs on window.onload

PaulKinlan commented 13 years ago

Ok cool - will investigate.

One thing to note, is that the server side templating will not currently set the correct class either, so I will raise a bug and fix that.

PaulKinlan commented 13 years ago

The theory behind this is that the server should do it, given that it completly loads the state and thus the routing framework shouldn't need to fire....

I have fixed the server to render the correct state. Saying that I still think the routing framework should at least trigger the event.

PaulKinlan commented 13 years ago

Server states should be set correctly now.