-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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: Restore focus after cycling out of the callout #1477
DatePicker: Restore focus after cycling out of the callout #1477
Conversation
This is a fix for issue 2 mentioned in #1266
@@ -158,6 +158,12 @@ export class Calendar extends BaseComponent<ICalendarProps, ICalendarState> impl | |||
if (ev.which === KeyCodes.enter) { | |||
ev.preventDefault(); | |||
this._onGotoToday(); | |||
} else if (ev.which === KeyCodes.tab && !ev.shiftKey) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add similar logic for shift+tab
on the first tab stop of the Calendar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 61b91e3
Quick ping to @MLoughry to hit the merge button before the master advances again :) |
@c-w do you not have merge access? We typically allow the PR creator to merge the PR once it has been approved. If not, I'll do it for you now. |
Pull request checklist
Description of changes
After focus leaves the date picker, it skips everything else on the page, making it impossible to tab through the whole page. This pull request fixes this behavior by restoring focus to the date picker's text input after the picker is dismissed.
Focus areas to test
Test steps (verified manually on DatePicker.Input.Example: screencast):
(Split out from #1451)