Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigating to a URL with a link hash does not activate the :target selector #7285

Closed
1 task done
tmcw opened this issue Aug 28, 2023 · 1 comment
Closed
1 task done

Comments

@tmcw
Copy link
Contributor

tmcw commented Aug 28, 2023

What version of Remix are you using?

1.19.3

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

Here's a minimal testcase repo: https://github.com/tmcw/remix-hash-target-testcase

That's

  1. Setting up the minimal npx command
  2. Adding a page with an h1, an id, and a style that colors it yellow when it's the target (h1:target)
  3. Adding a link to that page

Expected Behavior

Linking to a page with a hash should scroll to the hash and set the element matching the hash's ID as the :target (this is how the selector is documented to work).

Actual Behavior

On navigation, the element is not highlighted. If you refresh the page after navigating, you get the correct highlighting.

@tmcw
Copy link
Contributor Author

tmcw commented Aug 28, 2023

Ah, found a duplicate: #6432

@tmcw tmcw closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant