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

Handle focus when tabbing out of flatpickr #1441

Merged
merged 1 commit into from
Jul 20, 2018
Merged

Handle focus when tabbing out of flatpickr #1441

merged 1 commit into from
Jul 20, 2018

Conversation

andrewlouie
Copy link
Contributor

What's Changed?
Added to the handler for tab event so if you tab off flatpickr it will refocus your input element instead of jumping to the beginning of the DOM

How To Test

  1. Add some links to the page before and after your input element so you can track the focus
  2. Open flatpickr with a calendar
  3. Use the cursors to navigate
  4. Press tab. You'll now end up at the next element on the page instead of at the top of the page

also

  1. Open flatpickr with noCalendar: true and enableTime: true
  2. Set a time, press tab past the AM/PM
  3. You'll now end up at the next element on the page.

Notes
Issue #1236 says the desired behaviour for time only would be that tab would loop through hour/minute/am-pm but I would prefer it close flatpickr as it currently does.

@chmln chmln merged commit a823f13 into flatpickr:master Jul 20, 2018
@andrewlouie andrewlouie deleted the accessibility-fixes branch July 23, 2018 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants