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

[joy-ui][Toggle Button] Not working well with a tooltip #39309

Closed
1 task done
danilo-leal opened this issue Oct 4, 2023 · 2 comments · Fixed by #39571
Closed
1 task done

[joy-ui][Toggle Button] Not working well with a tooltip #39309

danilo-leal opened this issue Oct 4, 2023 · 2 comments · Fixed by #39571
Assignees
Labels
component: toggle button This is the name of the generic UI component, not the React module! component: tooltip This is the name of the generic UI component, not the React module! package: joy-ui Specific to @mui/joy

Comments

@danilo-leal
Copy link
Contributor

danilo-leal commented Oct 4, 2023

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

Here's a Code Sandbox link with buttons wrapped by tooltips within a Toggle Button container.

Current behavior 😯

When wrapping buttons inside a Toggle Button container with tooltips, they appear correctly. However, what happens then is that the selection behavior is damaged. In other words, a button doesn't stay "toggled on" after clicking on it if a tooltip wraps it.

Expected behavior 🤔

A clicked button should be "toggled on" even if it has a wrapping tooltip.

Context 🔦

As a benchmark, even though each of these components has a different interaction naturally, it seems like buttons inside a Button Group, as opposed to a Toggle Button Group, don't suffer from this problem.

@danilo-leal danilo-leal added component: tooltip This is the name of the generic UI component, not the React module! component: toggle button This is the name of the generic UI component, not the React module! package: joy-ui Specific to @mui/joy labels Oct 4, 2023
@adamhylander
Copy link
Contributor

I can take a look at this one if that's ok with you

@danilo-leal
Copy link
Contributor Author

@adamhylander yup, go ahead! Appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: toggle button This is the name of the generic UI component, not the React module! component: tooltip This is the name of the generic UI component, not the React module! package: joy-ui Specific to @mui/joy
Projects
None yet
3 participants