AlexxNB / tinro

Highly declarative, tiny, dependency free router for Svelte's web applications.
MIT License
669 stars 30 forks source link

Tiro breaks on links with custom URI schemes #34

Closed jnordberg closed 3 years ago

jnordberg commented 3 years ago

I have an app that uses a link with a custom url scheme and when it is clicked a error is thrown in tinro's click handler:

SecurityError: Blocked attempt to use history.pushState() to change session history URL from http://localhost:8080 to esr:[redacted]. Protocols, domains, ports, usernames, and passwords must match.
AlexxNB commented 3 years ago

can you provide an example of the link? Do you use <a> element or navigate with router.goto()?

jnordberg commented 3 years ago

Any <a> link with a non-http protocol will trigger it. E.g.<a href="mailto:hello@example.com">Test</a>.

Upon further inspection it's only reproducible in Safari, Chrome and Firefox does not throw the error when clicking the link

AlexxNB commented 3 years ago

Thanks! Should be fixed in v0.4.6

jnordberg commented 3 years ago

Confirmed fixed! Thanks!