-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 unexpected blur call #1107
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems fine, but it does add a new dependency on “contains”; is there a way that this could use a modified https://github.com/airbnb/browser-shims/blob/master/document-contains.js that doesn’t modify the environment?
.gitignore
Outdated
@@ -48,3 +48,5 @@ package-lock.json | |||
|
|||
css/styles.css | |||
|
|||
.vscode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert this and add it it your personal global gitignore; individual editors’ files shouldn’t force a change in every repo that individual uses.
Hey Jordan, |
5ca544a
to
8de8df0
Compare
Fair point :-) in that case, we've already got this issue and your PR doesn't add it, so let's go ahead with it! I've rebased your branch for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! :)
I'm using react-dates inside a Drop. This drop is triggered by an input. As of now, when I transition months the drop is getting closed unexpectedly. My drop closes on input blur, and react-dates calls
activeElement.blur()
after the month transition. I'm not entirely sure why this is there, but I believe it should only be done if the activeElement is a child of your container.Hopefully this PR looks good to you, otherwise let me know what needs to be changed.
FYI. I added .vscode to .gitignore so that editor files are not accidentally added.