Closed jkells closed 3 years ago
The hashchange event is not invoked for page 1 for IE For more debug info add this at bottom
<script>
$(function() {
$(window).on("hashchange", function() {
console.log(location.hash + ' -> hashchange');
});
});
</script>
This don't trigger the hashchange event for IE
<a href="#/Page1">Page 1</a>
Workaround, use
page1Url: "#/Page1",
and
<a href="#" data-bind="attr:{ href: page1Url}">Page 1</a>
Thanks kunukn, I did something similar as a workaround before posting the issue.
Looks like this was fixed in 0.7.6 (b7019809302c87ea07f2d454d9c28855ea441cdf). Bug also documented here: https://github.com/quirkey/sammy/pull/183.
This still seems to be a problem in 0.7.6 unfortunately. Just encountered it. The fix above sorted me out.
When you have some links set directly in HTML and some bound to knockout properties navigating between them doesn't always work in IE. Both Firefox and Chrome work as expected.
I'm testing in IE11.
Here is an self explaining example of the problem:
Click the links in this order: 3, 2, 1, 2. In IE the final route is never run even though the URL hash changes