React-datepicker: Console report "Unable to preventDefault inside passive event listener invocation"

Created on 23 Feb 2018  路  8Comments  路  Source: Hacker0x01/react-datepicker

It's reported when I test on mobile with portal mode and click outside of calendar.
I tested with demo site and it has also same error.

wontfix

Most helpful comment

Same issue here:

Getting console error on dev environment:
'Unable to preventDefault inside passive event listener invocation.'

When closing-of Portal version (clicking on black surrounding area)

Any ideas?

All 8 comments

Same issue here:

Getting console error on dev environment:
'Unable to preventDefault inside passive event listener invocation.'

When closing-of Portal version (clicking on black surrounding area)

Any ideas?

Same bug here:
image

any ideas ? Could someone fix it? I really like this date picker!

HI folks, I just add autoFocus flag, and it fixes bug for me

HI folks, I just add autoFocus flag, and it fixes bug for me

Still have the error with autoFocus flag

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Is there a fix coming for this? Can reproduce the issue when using any of the mobile/touch device simulations in Chrome.

This issue has been resolved for react-onclickoutside.
https://github.com/Pomax/react-onclickoutside#regulating-evtpreventdefault-and-evtstoppropagation

Need add preventDefault={this.props.withPortal} here https://github.com/Hacker0x01/react-datepicker/blob/1a3402ca4f15c0d21976b0ca5e6f886416cd2a24/src/index.jsx#L704

 <WrappedCalendar preventDefault={this.props.withPortal}  ... >

Can still reproduce the problem. Why is it wontfix?

Was this page helpful?
0 / 5 - 0 ratings