-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Weird focus behaviour wiht react-datepicker #1539
Comments
Same here: Also focusing on ordinary input doesn't flicker, just react-select input produces this. |
same problem |
I am starting to think its a problem with react-select. |
@gilbertkaradja I'm pretty sure you are right. From what I can gather it looks like react-select is running event.stopPropagation() in handleMouseDown https://github.com/JedWatson/react-select/blob/master/src/Select.js#L330 which is preventing React-Datepicker from from getting notified https://github.com/Hacker0x01/react-datepicker/blob/master/src/datepicker.jsx#L181 that it has lost focus. You can see the event propagate properly if you right-click (Granted you won't get focus) or if react-select is disabled. |
I'm pretty sure this is an issue with the way react-datepicker is asynchronously refocusing the input when it is blurred. I don't totally understand the use case for that though, so it might be important to support. Will comment on that project to learn more. |
+1 |
Hello - In an effort to sustain the We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our limited efforts to maintain the latest version. If you aren't using the latest version of If you feel this issue / pull request is still relevant and you'd like us to review it, please leave a comment and we'll do our best to get back to you. |
There is already issue in react-datepicker: Hacker0x01/react-datepicker#730
Posting here also because not certain which component should fix this.
I have repository for reproducing it here: https://github.com/tume/select-datepicker-conflict
You can see the issue when first opening the calendar and then switching to react-select.
I have some more speculation about the cause in react-datepicker issue but it looks like to be problem with onBlur/mousedown event ordering if I'm correct. Would appreciate if you have any comments on this or how to fix it....
The text was updated successfully, but these errors were encountered: