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

Unable to scrollTo elements that have been faded out.

Open devluked opened this issue 3 years ago • 4 comments

Hello,

I have 3 scrollPages and 2 of them end up with the property display: none when they are out of focus. However, when I attempt to have my navbar scroll to these elements, it won't scroll up and I'm pretty sure it is because their display is none. Is there anyway to overwrite the display and just leave the opacity at 0 when I'm not scrolled to the element?

devluked avatar Jun 24 '21 03:06 devluked

Could you share me your code if it's okay? That problem code will be helpful when I fix it

1000ship avatar Jun 24 '21 14:06 1000ship

Hi 1000ship, the animation is in this file here: https://github.com/devluked/sass-personal-site/blob/main/src/Page.js. I found that when I went into the code and changed the display: none in the animation.ts, to display: initial it works. I'm going to try and fork and reinstall it to get it to work.

devluked avatar Jun 24 '21 16:06 devluked

Hi 1000ship, I actually forked your repository and changed the code in animation.ts to be display: "initial" so it works properly now.

devluked avatar Jun 24 '21 19:06 devluked

@devluked So good! I'm sorry to everyone made issue to my repo. I'm busy to fix bugs, nowadays. I'll check your forked soon. If you can send me PR, It's more comfortable to me. Thanks!

1000ship avatar Jul 01 '21 13:07 1000ship