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: Restore focus after cycling out of the callout #1477

Merged
merged 6 commits into from
Apr 12, 2017
Merged

DatePicker: Restore focus after cycling out of the callout #1477

merged 6 commits into from
Apr 12, 2017

Conversation

c-w
Copy link
Contributor

@c-w c-w commented Apr 11, 2017

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):

  1. Tab through the picker until the focus exists. Focus should be restored to the picker's input field.
  2. Continue tabbing through the document below the picker.

(Split out from #1451)

@@ -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) {
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 61b91e3

@c-w
Copy link
Contributor Author

c-w commented Apr 12, 2017

Quick ping to @MLoughry to hit the merge button before the master advances again :)

@micahgodbolt
Copy link
Member

@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.

@micahgodbolt micahgodbolt merged commit 184015d into microsoft:master Apr 12, 2017
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants