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 next/prev month arrows lose focus #2780

Closed
maxokorokov opened this issue Oct 10, 2018 · 2 comments · Fixed by #3381
Closed

Datepicker next/prev month arrows lose focus #2780

maxokorokov opened this issue Oct 10, 2018 · 2 comments · Fixed by #3381

Comments

@maxokorokov
Copy link
Member

In some browsers (ex. Firefox and Safari on Mac OS), clicking on the previous month or next month buttons loses focus and brings it to the <body>.

Steps to reproduce:

Notes:

  • works fine in Chrome
  • if next month is already focused, clicking on it doesn't lose focus
@Korla
Copy link

Korla commented Nov 19, 2018

Hi, I am wondering about this. Why was it removed from the milestone? Would you accept a PR which fixes this issue?

@maxokorokov
Copy link
Member Author

@Korla, sure, it would be nice to fix it. If I remember correctly this really varies from OS and on Windows should work fine.

I think <button> simply can't be focused on click in mentioned browsers, but needs investigation

peterblazejewicz added a commit to peterblazejewicz/ng-bootstrap that referenced this issue Sep 25, 2019
This fixes an issue on some clients due to browser being inconsistent on
handling focus on the button clicks. After the change the navigation
button within the datepicker will retain focus to allow subsequent
keyboard based navigation within datepicker instance.

Fixes: ng-bootstrap#2780
peterblazejewicz added a commit to peterblazejewicz/ng-bootstrap that referenced this issue Sep 25, 2019
This fixes an issue on some clients due to browser being inconsistent on
handling focus on the button clicks. After the change the navigation
button within the datepicker will retain focus to allow subsequent
keyboard based navigation within datepicker instance.

Fixes: ng-bootstrap#2780
@maxokorokov maxokorokov added this to the 5.1.2 milestone Sep 27, 2019
peterblazejewicz added a commit to peterblazejewicz/ng-bootstrap that referenced this issue Oct 18, 2019
This fixes an issue on some clients due to browser being inconsistent on
handling focus on the button clicks. After the change the navigation
button within the datepicker will retain focus to allow subsequent
keyboard based navigation within datepicker instance.

Fixes: ng-bootstrap#2780
maxokorokov pushed a commit that referenced this issue Oct 21, 2019
This fixes an issue on some clients due to browser being inconsistent on
handling focus on the button clicks. After the change the navigation
button within the datepicker will retain focus to allow subsequent
keyboard based navigation within datepicker instance.

Fixes: #2780
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.

3 participants