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

[Tabs] Tab activates when clicking non-primary mouse button #1317

Open
elieven opened this issue Jan 9, 2025 · 1 comment · May be fixed by #1318
Open

[Tabs] Tab activates when clicking non-primary mouse button #1317

elieven opened this issue Jan 9, 2025 · 1 comment · May be fixed by #1318
Assignees
Labels
bug 🐛 Something doesn't work component: tabs This is the name of the generic UI component, not the React module!

Comments

@elieven
Copy link

elieven commented Jan 9, 2025

Bug report

Current behavior

Tabs switch on any mousedown / pointerdown on the Tabs.Tab component.

Expected behavior

Presumably this should only happen on mousedown / pointerdown being the main button not also right or middle mouse click and such.

Reproducible example

https://master--base-ui.netlify.app/react/components/tabs

Use right or middle mouse button on the Tabs.Tab component

Base UI version

1.0.0-alpha.4

Which browser are you using?

Brave

Which OS are you using?

Windows

Which assistive tech are you using (if applicable)?

None

Additional context

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 9, 2025
@mj12albert mj12albert changed the title Tabs switch on any mousedown / pointerdown it seems [Tabs] switch on any mousedown / pointerdown Jan 10, 2025
@mj12albert mj12albert self-assigned this Jan 10, 2025
@mj12albert mj12albert added the component: tabs This is the name of the generic UI component, not the React module! label Jan 10, 2025
@mj12albert mj12albert changed the title [Tabs] switch on any mousedown / pointerdown [Tabs] Tab activates when clicking non-primary mouse button Jan 10, 2025
@mj12albert mj12albert added the bug 🐛 Something doesn't work label Jan 10, 2025
@mj12albert
Copy link
Member

mj12albert commented Jan 10, 2025

Thanks for reporting this @elieven ~ I found that it's incorrectly activating off the onFocus handler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: tabs This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants