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

DayPickerInput: Click handling broken in IE #668

Closed
leiit opened this issue Mar 15, 2018 · 6 comments
Closed

DayPickerInput: Click handling broken in IE #668

leiit opened this issue Mar 15, 2018 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@leiit
Copy link

leiit commented Mar 15, 2018

It seems the 7.10 release broke DayPickerInput date and month selection for IE. The problem seems to come from the changes introduced in #598. This is due to IE(9-11) emitting blur events with relatedTarget being null, which causes the overlay to always hide on blur regardless if the click happens inside overlay (--> date and month selection won't work). This can be reproduced on the example page at http://react-day-picker.js.org/examples/input.

See also facebook/react#3751

From my understanding, focusout handler wouldn't be much better for compatibility with Firefox support starting from v52 (https://developer.mozilla.org/en-US/docs/Web/Events/focusout). Not sure if there is any clean workaround apart from rolling back or using a global event handler.

@gpbl gpbl added src:DayPickerInput help wanted Extra attention is needed labels Mar 24, 2018
@gpbl
Copy link
Owner

gpbl commented Mar 24, 2018

Ugh this is hitting again :/ Maybe a solution is hinted here: facebook/react#11405 (comment)

If someone wants to jump in and try to fix this... I can't test on IE right now.

@gpbl
Copy link
Owner

gpbl commented May 6, 2018

This is fixed in v7.1.8. Please report back if you find again a similar issue, thanks!

@gpbl gpbl closed this as completed May 6, 2018
@akshygupt
Copy link

akshygupt commented Jul 19, 2018

It's breaking in Firefox,

https://codesandbox.io/s/x7n2qz1kq4
Date Picker doesn't close when you change a month but don't select a date.

@gpbl
Copy link
Owner

gpbl commented Jul 19, 2018

@akki199421 if showOverlay is set to true it works this way in any browser.

@akshygupt
Copy link

akshygupt commented Jul 20, 2018

@gpbl sorry, forgot to remove that, updated the code. If you change the month or year, the picker won't close.

https://codesandbox.io/s/563n6r9o4

@akshygupt
Copy link

@gpbl any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants