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

Datepicker: datepicker jumps when opened in a small viewport #3050

Open
xulingzhihou opened this issue Jun 9, 2022 · 1 comment
Open

Datepicker: datepicker jumps when opened in a small viewport #3050

xulingzhihou opened this issue Jun 9, 2022 · 1 comment

Comments

@xulingzhihou
Copy link

When rendered as a portal element menuPosition="overflowBoundaryElement" and display area is small, we observe jumpy behavior when opening datapicker by clicking on the calendar icon.
image
image
We believe it is caused by

this.selectedDateCell.focus();

when it is trying to focus on the dateCell, browser unnecessarily scrolls and results in the jumpy behavior.

Our proposed fix is setting preventScroll to true, this.selectedDateCell.focus({preventScroll: true});

@welcome
Copy link

welcome bot commented Jun 9, 2022

Thanks for opening your first issue! 👋
If you have found this library helpful, please star it. A maintainer will try to respond within 7 days. If you haven’t heard anything by then, please bump this thread.

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