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 does not close when input to open has focus #3583

Closed
Zwergenpunk opened this issue Feb 11, 2020 · 1 comment
Closed

Datepicker does not close when input to open has focus #3583

Zwergenpunk opened this issue Feb 11, 2020 · 1 comment

Comments

@Zwergenpunk
Copy link

Zwergenpunk commented Feb 11, 2020

Bug description:

When an input element has an ngbDatepicker as directive and the datepicker opens on (focus), a select click does not close the popover.
That last working versions is 5.1.1.

You can fix it if you change (focus) to (click), but still it should not be that way.

Link to minimally-working StackBlitz that reproduces the issue:

https://stackblitz.com/edit/angular-cmwpeh?file=src%2Fapp%2Fapp.component.html

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: 8.2.14

ng-bootstrap: 5.2.2

Bootstrap: 4.1.1

@maxokorokov
Copy link
Member

maxokorokov commented Feb 12, 2020

@Zwergenpunk PTAL at #3483

Here is how you could restore the behavior in 5.2.xhttps://stackblitz.com/edit/angular-useeq4?file=src/app/app.component.html

However, it becomes tricky with (focus) to restore focus correctly after the datepicker closure...

I'll close this one as a duplicate of #3483, please reopen if necessary though

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

No branches or pull requests

2 participants