-
-
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
Focus event triggered on fast interaction #2181
Comments
When that line is commented, then the |
When that line is commented the date picker works fine.
See attached video |
I understand when your problem occurs; i'm concerned that removing that line will re-cause the breakage that adding that line fixed. |
The root cause is the fact that the element is getting focus when it should not. I still cannot explain why clicking fast or on dates causes the top input to get focus |
react-dates/src/components/DateInput.jsx
Line 121 in b7bad38
On Firefox on Mac OS, if you keep clicking fast enough between the dates of a calendar it will trigger the focus event and therefore the clickOutSide function by the related target, causing the datepicker to close.
This issue happens on Firefox and unit test with jest and react testing library. Cannot replicate on chrome.
By commenting the above line everything works fine including the test.
The text was updated successfully, but these errors were encountered: