rafgraph / react-router-hash-link

Hash link scroll functionality for React Router
https://react-router-hash-link.rafgraph.dev
MIT License
732 stars 62 forks source link

Does not work :target pseudo selector of CSS #100

Open DilshadNoshad opened 2 years ago

rafgraph commented 2 years ago

Hi, please provide a failing example using code sandbox (or something similar). Thanks.

bibekg commented 1 year ago

Also experiencing this issue. Here's a code sandbox to repro. https://codesandbox.io/s/react-router-hash-link-issue-100-jube42

Clicking the "Test 1" and "Test 2" links should give the headings a short highlighting animation but they don't. You can confirm in DevTools that manually applying the :target selector does behave as expected.

https://user-images.githubusercontent.com/8083680/228643168-b6e67eeb-ee78-4ad6-9ced-bc9fab5c80ab.mp4

I'm not totally sure but this may just be an issue with React Router itself.