react-scroll icon indicating copy to clipboard operation
react-scroll copied to clipboard

How to hightlight active link on last section smaller than viewport?

Open online0227 opened this issue 6 years ago • 9 comments

Hello.

Everything about setting active for the current section corresponding to the top menu as scrolling down works fine except the last section that is smaller than viewport.

If I give an offset to last element to highlight faster then the problem is that on the top menu it highlights both of last section and the one before the last one.

Can you give me some tips how to make this with this library?

online0227 avatar Oct 09 '19 19:10 online0227

Hello,

Currently no support in this lib.

I usually put some margin/padding at the bottom.

fisshy avatar Oct 10 '19 05:10 fisshy

Thanks for response.I don't want to expand visible footer size so I may not do that.

online0227 avatar Oct 12 '19 05:10 online0227

Hey, Any work around for this issu ?

az-iB avatar Jan 13 '20 10:01 az-iB

I'm currently facing the same problem. I've tried a few things, but nothing has solidified yet. Some advice would be amazing!

pixelleaf avatar Oct 03 '20 06:10 pixelleaf

Does anyone have a suggestion/workaround for this? Would be amazing, cause the last element becomes really annoying

FrancoMuniz avatar Nov 21 '20 23:11 FrancoMuniz

The fix shouldn't be too hard? if container is scrolled to bottom last item should become active? Wonder why this feature is not supported!

rmanium avatar Dec 31 '20 20:12 rmanium

Does anyone have a suggestion/workaround for this? Would be amazing, cause the last element becomes really annoying

A hacky solution for now could be to set a custom offset for the last item and manipulate the active class yourself

rmanium avatar Dec 31 '20 21:12 rmanium

Does anyone have a suggestion/workaround for this? Would be amazing, cause the last element becomes really annoying

A hacky solution for now could be to set a custom offset for the last item and manipulate the active class yourself

How to manipulate active class, exactly?

amand33p avatar Feb 11 '21 13:02 amand33p

Having same issue unfortunately. Would be open to hacky solutions if they didn't involve changing the viewport

iraqwarvet31 avatar May 15 '21 17:05 iraqwarvet31