You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When upgrading to version v7.4.0, react-onclickoutside has been removed as part of this release: #4979
This however will reintroduce an old bug from here: #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:
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
The text was updated successfully, but these errors were encountered:
gunavata
changed the title
Removal of react-onclickoutside reintroduces bug calender closing when wrapping with shadow-dom
Calendar not clickable when wrapped with shadow-dom - Removal of react-onclickoutside reintroduces bug
Oct 11, 2024
Describe the bug
When upgrading to version v7.4.0, react-onclickoutside has been removed as part of this release:
#4979
This however will reintroduce an old bug from here:
#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
The text was updated successfully, but these errors were encountered: