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

Fix single date picker not responding to input. #1533

Merged
merged 1 commit into from
Feb 7, 2019

Conversation

monokrome
Copy link
Contributor

@monokrome monokrome commented Feb 7, 2019

After the 18.4.1 patch, we an issue has occurred where focusout always causes the day picker to close when a click occurs anywhere on the page - even within the day picker itself. This is because the <Portal> is being placed around the day picker instead of it's containers. This PR fixes that issue by placing the handler on a element above the Portal.

Thanks to @alvaro-cuesta for discovering this one and letting us know; fixes #1522

/cc @airbnb/ui-frameworks

@@ -253,25 +253,25 @@ class SingleDatePicker extends React.PureComponent {
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The changes in this file seem odd, but they are just moving the calls for (add|remove)EventListeners and having them use dayPickerContainer instead.

@monokrome monokrome requested a review from ljharb February 7, 2019 01:36
@monokrome monokrome added the semver-patch: fixes/refactors/etc Anything that's not major or minor. label Feb 7, 2019
@coveralls
Copy link

Coverage Status

Coverage remained the same at 84.979% when pulling b40a792 on bailey-bugfix-portal-containment into 143119d on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch: fixes/refactors/etc Anything that's not major or minor.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SingleDatePicker auto closes on clicking anywhere when appendToBody={true}
3 participants