ruffle icon indicating copy to clipboard operation
ruffle copied to clipboard

web: Fix navigating to URLs with query params

Open Dinnerbone opened this issue 3 weeks ago • 2 comments

This fixes an issue reported on Discord.

When we try to navigate to a url that already has a query string, it will be removed unless the method is POST.

Dinnerbone avatar Dec 08 '25 22:12 Dinnerbone

I think we can add a web test for it, it should be pretty straightforward

kjarosh avatar Dec 09 '25 08:12 kjarosh

Why do we use a hidden form submission to navigate to URL rather than something like window.location.assign()?

n0samu avatar Dec 10 '25 05:12 n0samu

Why do we use a hidden form submission to navigate to URL rather than something like window.location.assign()?

There's a path that does that, but it seems to use this if there's a chance that it might not be GET or wants to encode additional parameters. I guess we could specialize that further if it's GET+_self+no arguments, but, this code path should work in any case.

Dinnerbone avatar Dec 12 '25 19:12 Dinnerbone

I think we can add a web test for it, it should be pretty straightforward

I'm struggling to make a test for this, webdriverio (or specifically, the browsers themselves) do not seem to like pages navigating if not done by the driver itself.

Dinnerbone avatar Dec 12 '25 20:12 Dinnerbone