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

Fixed broken DateInput close feature due to bumping react-day-select #2157

Merged
merged 2 commits into from
Mar 8, 2018

Conversation

mud
Copy link
Contributor

@mud mud commented Feb 20, 2018

Fixes #2155

Checklist

  • Include tests

Changes proposed in this pull request:

Fixed issue caused by bumping react-day-select.

Reviewers should focus on:

The update in react-day-select caused a slight change in behavior. Tabbing inside the date select popover will tab through the month, year selectors, then prev/next month arrow, then the first day of the current month. Prior version focused on the prev and next month's dates ie. days with DayPicker-Day--outside class. Now, after tabbing out of the first day of the current month, the popover will close.

Additionally, once the first day is focused, users can move the focused day by using the arrow keys. This PR adds changes which will allow the user to move the focused day and still close the popover by pressing tab anytime.

Screenshot

feb-19-2018 20-24-49

@adidahiya adidahiya requested a review from giladgray March 7, 2018 21:27
this.unregisterPopoverBlurHandler();
this.lastElementInPopover = lastElement;
this.lastElementInPopover.addEventListener("blur", this.handlePopoverBlur);
if (!lastTabbableElement) {
Copy link
Contributor

Choose a reason for hiding this comment

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

prefer != null

@giladgray giladgray merged commit d44ca14 into palantir:develop Mar 8, 2018
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.

DateInput ESC key handler regression
2 participants