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

Conversation

Projects
None yet
4 participants
@c-w
Copy link
Contributor

commented Apr 11, 2017

Pull request checklist

  • Addresses an existing issue: #1266
  • Include a change request file if publishing
  • New feature, bugfix, or enhancement
    • Includes tests
  • Documentation update

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)

c-w added some commits Apr 11, 2017

Restore focus after cycling out of the callout
This is a fix for issue 2 mentioned in #1266

@c-w c-w referenced this pull request Apr 11, 2017

Merged

DatePicker: Add option to not auto-open on focus #1451

2 of 5 tasks complete
@@ -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) {

This comment has been minimized.

Copy link
@MLoughry

MLoughry Apr 11, 2017

Collaborator

You should add similar logic for shift+tab on the first tab stop of the Calendar

This comment has been minimized.

Copy link
@c-w

c-w Apr 11, 2017

Author Contributor

Done in 61b91e3

@c-w

This comment has been minimized.

Copy link
Contributor Author

commented Apr 12, 2017

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

@micahgodbolt

This comment has been minimized.

Copy link
Collaborator

commented Apr 12, 2017

@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 OfficeDev:master Apr 12, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.