Skip to content

Conversation

@TrySound
Copy link
Member

@TrySound TrySound commented Feb 28, 2025

Fixes #4830

Remix incorrectly navigates hashes and clear search params. Here fixed this by using native <a> and tweaked the logic in builder.

Test navigating hashes (when search params are present) in builder and on published site.

@TrySound TrySound requested review from johnsicili and kof February 28, 2025 10:19
Fixes #4830

Remix incorrectly navigates hashes and clear search params.
Here fixed this by using native `<a>` and tweaked the logic in builder.
@johnsicili
Copy link
Contributor

Hey this actually fixes #3974 :)

The only problem I'm seeing is the query params are stripped still. Am I doing something wrong?

noqueryparams.mp4

@TrySound
Copy link
Member Author

TrySound commented Mar 1, 2025

Ah, right. Well page+id selector still doesn't work because it relies on specific page. And when you put for example into slot we cannot use "current page matches specified one" heuristic. But "#my-id" string url should work.

Copy link
Contributor

@johnsicili johnsicili left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah makes sense! Good stuff thanks

@TrySound TrySound merged commit ddc425c into main Mar 2, 2025
29 checks passed
@TrySound TrySound deleted the fragment-links.staging branch March 2, 2025 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fragment links remove query params

3 participants