Svelte Button not redirecting to link in href

I must be missing something simple but I can’t make a simple button with an href to open the link.
I tried adding external and preventRouter with no success.
This is the code I am using:

When I click the button “Click Me”, nothing happens when I am expecting it to redirect to the link in the href.

Have you tried using the “https:” schema instead of “http:”?

Cause the code u linked works just fine if you change “” to “”… well except for the fact that codesandbox doesn’t allow linking to other sites with “_self”.

It looks like you’re having a backend cors problem not a frontend problem, can you confirm?

Thanks for helping @tncrazvan :grinning:

Indeed the https works in codesandbox.
But in my app (Ruby on Rails with Svelte), nothing works. I was initially trying a local page with a path like /path/to/somewhere then I tried but no luck.
I also tried with target="_blank" and still no luck.

I have a doubt about being a cors problem because I can do a fetch from svelte to Rails and the call is not blocked.
Also I have no errors in the console.

I tried adding a link outside of the svelte app and it’s not working either. And the old links in html that worked before don’t work anymore :sweat: