react-scrollable-anchor icon indicating copy to clipboard operation
react-scrollable-anchor copied to clipboard

It does not scroll correctly

Open justinecomment opened this issue 8 years ago • 3 comments

Hi there!

i've tried to use it on two different components, a menu and the other components (which contains the anchors) When i click on the menu nothing happens however the URL is correctly modified. if I let it as localhost/#item and refresh the browser it correctly scrolls down to the element.

Any idea how I can fix this?

justinecomment avatar Mar 13 '18 22:03 justinecomment

Do you have the code available, or a demo?

awitherow avatar May 01 '18 02:05 awitherow

I am experiencing the same issue. The url is being updated (most likely due to HTML/React itself) but no scrolling is taking place.

Relevant code: https://paste.ofcode.org/38s55GyB4baHePvBbh73GBy

React version: 6.1.0 I'm working in a Gatsby project. Not sure if that has anything to do with it.

jskrt avatar Jun 04 '18 20:06 jskrt

Fixed. Wrap content in a div to make it work properly.

jskrt avatar Jun 05 '18 14:06 jskrt