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

Handling of elements with dynamic height, for example accordions #64

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Handling of elements with dynamic height, for example accordions #64

wants to merge 2 commits into from

Conversation

RenatKunafin
Copy link

I had a problem with react-scroll. I used accordions in my project. If scroll the page, return to the top, and after that open an accordion then if you scroll manually again you will see that elements getting active in wrong places.
I familiarized with issues #49 and #59 but that problem does not solved. So I tried solve that issue myself.

@fisshy
Copy link
Owner

fisshy commented Mar 25, 2016

Looks cool. Haven't tried it myself yet, but will do and then most likely merge it.
Can you write a few tests for it?

@RenatKunafin
Copy link
Author

Ok, in few days.

}
var cords = element.getBoundingClientRect();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if element is undefined?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still have "if" statement in that case:
if(!element) { element = scroller.get(to); }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants