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

util.getPosition - incorrect value for top with a 'sticky' picker #210

Open
StompyNZ opened this issue Oct 3, 2017 · 0 comments
Open

util.getPosition - incorrect value for top with a 'sticky' picker #210

StompyNZ opened this issue Oct 3, 2017 · 0 comments

Comments

@StompyNZ
Copy link

StompyNZ commented Oct 3, 2017

When applying css to make the container div for the date picker sticky and you scroll down the page the picker opens further down the page than it should.

With the following css class applied the further you scroll down the further down the page the picker opens:
.datepicker-container {
position: -webkit-sticky;
position: sticky;
top: 0;
}

To fix in my current application I made the following change in utils.getPosition

y += elem.offsetParent.getBoundingClientRect().top before the while loop, instead of y += elem.offsetTop; inside the loop

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

No branches or pull requests

1 participant