Specifically, when the datepicker is open, clicking anywhere, including trying to click the datepicker popup content's itself, will automatically close the datepicker pop up without registering the click.
To Reproduce
Steps to reproduce the behavior:
Install version 7.4.0 of react-datepicker
Create a shadow root component
Insert a general Datepicker component with minimal setup i.e selected + onchange handler inside the shadow root component
Open the datepicker by clicking it
Attempt to click anything inside the datepicker popup (NOK -> will close the datepicker popup on a "mousedown" event)
Expected behavior
Datepicker pop up should not close on a mousedown event and should instead register the click appropriately.
Screenshots
Example datepicker:
Example render:
Example html:
Desktop (please complete the following information):
OS: Windows 10
Browser: Chrome
Version: 129.0.6668.71 (Official Build) (32-bit)
Smartphone (please complete the following information):
NA
Additional context
Downgrading to v7.3.0, the datepicker works fine. Only present in v7.4.0
Describe the bug When upgrading to version v7.4.0, react-onclickoutside has been removed as part of this release: https://github.com/Hacker0x01/react-datepicker/pull/4979
This however will reintroduce an old bug from here: https://github.com/Hacker0x01/react-datepicker/issues/1928
Specifically, when the datepicker is open, clicking anywhere, including trying to click the datepicker popup content's itself, will automatically close the datepicker pop up without registering the click.
To Reproduce Steps to reproduce the behavior:
Expected behavior Datepicker pop up should not close on a mousedown event and should instead register the click appropriately.
Screenshots Example datepicker: Example render: Example html:
Desktop (please complete the following information):
Smartphone (please complete the following information):
NA
Additional context Downgrading to v7.3.0, the datepicker works fine. Only present in v7.4.0