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

ngbDatepicker - container body causes page to scroll to bottom #4290

Closed
jecraig opened this issue Mar 17, 2022 · 1 comment · Fixed by #4294
Closed

ngbDatepicker - container body causes page to scroll to bottom #4290

jecraig opened this issue Mar 17, 2022 · 1 comment · Fixed by #4294

Comments

@jecraig
Copy link

jecraig commented Mar 17, 2022

Bug description:

When using ngbDatepicker with the container set as "body", opening the datepicker popup causes the screen to scroll to the bottom of the page.

Link to minimally-working StackBlitz that reproduces the issue:

https://angular-ivy-q3pj7e.stackblitz.io

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: 13.3.0
ng-bootstrap: 12.0.0
Bootstrap: 5.1.3

@maxokorokov
Copy link
Member

Works with ng-bootstrap < 12, looks like focus is set before popup is positioned with popper

maxokorokov added a commit to maxokorokov/ng-bootstrap that referenced this issue Mar 23, 2022
Delaying setting focus until after the popup is positioned with popper.

Fixes ng-bootstrap#4290
@maxokorokov maxokorokov modified the milestones: 12.1.0, 12.0.2 Mar 23, 2022
maxokorokov added a commit that referenced this issue Mar 30, 2022
)

Delaying setting focus until after the popup is positioned with popper.

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

Successfully merging a pull request may close this issue.

2 participants