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

Closing modal with ESC is interrupted by datepicker #3358

Closed
peterblazejewicz opened this issue Sep 7, 2019 · 0 comments · Fixed by #3371 or #3384
Closed

Closing modal with ESC is interrupted by datepicker #3358

peterblazejewicz opened this issue Sep 7, 2019 · 0 comments · Fixed by #3371 or #3384

Comments

@peterblazejewicz
Copy link
Contributor

Bug description:

If there is a datepicker component with an overlay, which uses ESC key within parent modal, also with ESC key feature enabled, opening the datepicker and then closing it with ESC, disabled effectively the ESC feature on the container modal, requiring user to perform additional action to refocus any content within modal.

This is probably related to: #3317

This could be repeated with default demo content:

https://stackblitz.com/run?file=app/modal-basic.ts
https://ng-bootstrap.github.io/#/components/modal/examples#basic

  • open basic demo modal, it comes with the datepicker component
  • use keyboard to focus the datepicker button
  • open datepicker but do not pick a date
  • instead close the picker using the ESC key (works)
  • now you should be back to modal container
  • being in the modal, try to use ESC key again

Link to minimally-working StackBlitz that reproduces the issue:

As stated, this is repeatable with demo content:
https://ng-bootstrap.github.io/#/components/modal/examples#basic

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: n/a

ng-bootstrap:
5.1.1

Bootstrap:
n/a

@maxokorokov maxokorokov added this to the 5.1.2 milestone Sep 20, 2019
@maxokorokov maxokorokov modified the milestones: 5.1.2, 5.2.0 Sep 20, 2019
maxokorokov added a commit to maxokorokov/ng-bootstrap that referenced this issue Sep 20, 2019
At the moment the focus is lost, so it will be restored to the
previously focused element (before datepicker was opened)

Fixes ng-bootstrap#3317
Fixes ng-bootstrap#3358
@maxokorokov maxokorokov modified the milestones: 5.2.0, 5.1.2 Sep 20, 2019
maxokorokov added a commit to maxokorokov/ng-bootstrap that referenced this issue Sep 20, 2019
At the moment the focus is lost, so it will be restored to the
previously focused element (before datepicker was opened)

Fixes ng-bootstrap#3317
Fixes ng-bootstrap#3358
maxokorokov added a commit to maxokorokov/ng-bootstrap that referenced this issue Sep 27, 2019
Fixes an issue for datepicker, typeahead, dropdown inside the modal.
When these components are closed on ESC, modal stays open.

Fixes ng-bootstrap#3358
maxokorokov added a commit to maxokorokov/ng-bootstrap that referenced this issue Sep 27, 2019
Fixes an issue for datepicker, typeahead, dropdown inside the modal.
When these components are closed on ESC, modal stays open.

Fixes ng-bootstrap#3358
maxokorokov added a commit that referenced this issue Sep 27, 2019
…3384)

Fixes an issue for datepicker, typeahead, dropdown inside the modal.
When these components are closed on ESC, now modal stays open.

Fixes #3358
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment