Closed iainxt closed 12 years ago
I have added some code to set the state if it is null. This is in the handler to the route event: if (!window.history.state) { console.info('Replacing state'); window.history.replaceState({ _davis: { title: req.title, fullPath: req.fullPath, method: "get", id: req.id} }, req.title, req.fullPath); }
A little hacky, but does the job
FYI I have added an id property, which is really a timestamp. I use it to detect back button clicks and if so the the animated slide is revered
This should be fixed in the latest version of davis (0.9.3). Let me know if you continue to have any problems.
I also added a timestamp property to the request so you should be able to get a better idea of if you are moving forward or backward through the history stack
Another one with back button. I've upgraded to davis 0.9.2, and applied my fixes. I'm finding that when I load the page, navigate to another page via html 5, hit back, then because history.state is null, it is not doing anything. I have debugged it and it appears my adjustments are not the cause. Any ideas?