Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
fix(module:date-picker): open on enter and focus on inner input #3804
Extracted the good parts suitable for a11y from #3146. See discussion there.
Please check if your PR fulfills the following requirements:
What kind of change does this PR introduce?
What is the current behavior?
Opening date-picker with keyboard is not possible.
Opening date-picker by a click, does not focus on the inner input element.
Issue Number: N/A
What is the new behavior?
You can open date-picker pressing enter on the keyboard when the wrapper element is selected.
Once date-picker is open, the inner input element is selected, so it is immediately possible to input date from keyboard. (Of course, this is only applicable to the cases, when there is an inner input element: e.g., month and year pickers do not have any).
Does this PR introduce a breaking change?
referenced this pull request
Jul 16, 2019
Deploy preview for ng-zorro-master ready!
Built with commit 4db785f
@@ Coverage Diff @@ ## master #3804 +/- ## ========================================== + Coverage 95.39% 95.39% +<.01% ========================================== Files 712 712 Lines 14633 14640 +7 Branches 1929 1930 +1 ========================================== + Hits 13959 13966 +7 Misses 244 244 Partials 430 430
Jul 18, 2019
Jul 18, 2019
However, 1 seems to be more subtle. A probable fix (which I am not really aware of) requiring an enter on changes could possibly disrupt the behavior of different components, because calendar-input is used in many places. Besides, it is not really an improvement but conformance to the react version, which is not necessarily 100% better. Lastly, it is not really that connected to the PR at hand. I think it is better to state 1 in a separate issue.
@@ Coverage Diff @@ ## master #3804 +/- ## ========================================== - Coverage 95.25% 95.24% -0.02% ========================================== Files 726 726 Lines 14652 14679 +27 Branches 1907 1911 +4 ========================================== + Hits 13957 13981 +24 - Misses 259 260 +1 - Partials 436 438 +2