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

Select on click event does not stop event propagation #5376

Closed
alexkneis opened this issue Nov 7, 2023 · 2 comments
Closed

Select on click event does not stop event propagation #5376

alexkneis opened this issue Nov 7, 2023 · 2 comments

Comments

@alexkneis
Copy link

Provide a general summary of the issue here

Creating a select component using the useSelectState() hook even together with an Overlay from @react-aria/overlays does not prevent the event propagation.

Example on current docs page where the event is also being triggered on the # link.
https://github.com/adobe/react-spectrum/assets/29652953/83404621-766e-488d-9423-6d9e183aa2be

Tested on ios/mac on chrome and firefox

🤔 Expected Behavior?

The click event on an list-item using the useSelectState should stop the event propagation.

😯 Current Behavior

Clicking an element inside the list of options also triggers the click event on whatever is behind the list.

💁 Possible Solution

No response

🔦 Context

No response

🖥️ Steps to Reproduce

  1. Go to useSelect in the react-aria docs
  2. Open a version of the page
  3. Scroll up to the select example above and click the option just in front of the # link next to "Popover"
  4. See the content jumping to the corresponding id

Version

3.29.1

What browsers are you seeing the problem on?

Chrome, Safari

If other, please specify.

No response

What operating system are you using?

ios/mac

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

@reidbarber
Copy link
Member

Potentially a duplicate of #1513

@alexkneis
Copy link
Author

It is indeed 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants