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

[Bug]: Clicking on Select triggers a click event on the body/html tag #1436

Open
ricketyBridges opened this issue Nov 18, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@ricketyBridges
Copy link
Contributor

ricketyBridges commented Nov 18, 2024

Environment

Development/Production OS: Any
Radix Vue version: 1.9.9
Vue version: latest

Link to minimal reproduction

https://stackblitz.com/edit/izdn5j-kntbmu?file=src%2FApp.vue

Steps to reproduce

Open browser dev tools console. Click on Select to see event.target. Click on button and divs to see correct event.target.

Describe the bug

Clicking on Select triggers a click event on the body/html tag. This is unexpected behavior for click event listeners. For example if I have a component that must close when you click outside of it, and there is a Select inside of it, it will always close when clicking the select.

I believe this may apply to clicking any part of the select, from the initial trigger, to options, and more. If there a way to expose click.stop on them that may also work, but I haven't been able to get click.stop to work.

Expected behavior

Ideally event.target should be the trigger element.

Context & Screenshots (if applicable)

No response

@ricketyBridges ricketyBridges added the bug Something isn't working label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant