angular-ui / bootstrap

PLEASE READ THE PROJECT STATUS BELOW. Native AngularJS (Angular) directives for Bootstrap. Smaller footprint (20kB gzipped), no 3rd party JS dependencies (jQuery, bootstrap JS) required. Please read the README.md file before submitting an issue!
http://angular-ui.github.io/bootstrap/
MIT License
14.3k stars 6.74k forks source link

Datepicker loses focus is lost when switching modes #6620

Open LyraelRayne opened 6 years ago

LyraelRayne commented 6 years ago

Bug description:

When the UIB datepicker changes modes, the focus is lost. This makes keyboard navigation difficult when mode switching is used.

Link to minimally-working plunker that reproduces the issue:

http://angular-ui.github.io/bootstrap/#!#datepickerPopup

Steps to reproduce the issue:

  1. Open the date picker popup.
  2. Press Ctrl+Up
  3. Datepicker is no longer focused

Version of Angular, UIBS, and Bootstrap

Angular: 1.6.1

UIBS: 2.5.0

Bootstrap: 3.3.7

Probable reason

I'm guessing this is caused by the ng-switch swapping out the datepicker div, meaning that no element has focus.