Zaid-Ajaj / Feliz.Router

A router component for React and Elmish that is focused, powerful and extremely easy to use.
MIT License
78 stars 16 forks source link

fix IE: use hashchange event instead, popstate is not supported #14

Closed stroborobo closed 4 years ago

stroborobo commented 4 years ago

Hey Zaid,

1.8.0 broke IE compatibility by removing the hashchange event. Maybe with a useragent check like this we could bring it back?

Zaid-Ajaj commented 4 years ago

Hello @stroborobo, it seemed I forgor IE was still a thing we had to take care of 😅 I like this fix. However, referencing an entire package is a bit too much just to use navigator.userAgent. Maybe use something like this instead?

[<Emit("window.navigator.userAgent")>]
let navigatorUserAgent : string = jsNative
stroborobo commented 4 years ago

Good point! Updated the commit.

Zaid-Ajaj commented 4 years ago

Published as of v1.9.0 :rocket: should be available as soon as Nuget finished indexing. Thanks a lot for the fix 🙏

stroborobo commented 4 years ago

Great! Thanks a lot for the quick release <3