Skip to content

Opening dropdown via dropdown icon hijacks events (react-datepicker example) #5050

Closed
@rkulinski

Description

@rkulinski

When using react-select with react-datepicker it seems that some architectural issue of react-select shows up.

Repro:
https://stackblitz.com/edit/react-o6gkep?file=src/App.js

Correct behaviour:

  1. Open datepicker.
  2. Click on select (not the part with icon on right) and observe datepicker is closed correctly.

Issue:

  1. Open datepicker.
  2. Click on the part with icon on right of select and observe datepicker is not closed.

I think there's a problem with how this div with icon is designed. Seems to me like it's highjacking events. That doesn't happen for other part of the select and IMO it shouldn't happen here as well.

It was reported here:
#1539
but closed without any resolution.

Versions:

    "react": "17.0.2",
    "react-datepicker": "4.6.0",
    "react-dom": "17.0.2",
    "react-select": "^5.2.2"

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/bug-unconfirmedIssues that describe a bug that hasn't been confirmed by a maintainer yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions