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

Tooltips disappearing when clicking different tooltips #7260

Closed
2 tasks done
queeniema opened this issue Nov 10, 2020 · 2 comments · Fixed by #7319
Closed
2 tasks done

Tooltips disappearing when clicking different tooltips #7260

queeniema opened this issue Nov 10, 2020 · 2 comments · Fixed by #7319

Comments

@queeniema
Copy link

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

Describe in detail the issue you're having.

When there are multiple tooltips and one tooltip is open, clicking on another tooltip causes the second tooltip to briefly appear and then disappear.

Is this issue related to a specific component?

Yes, the Tooltip component.

What did you expect to happen? What happened instead? What would you like to
see changed?

I expect the second tooltip to stay open after clicking on it.

What browser are you working in?

Google Chrome Version 86.0.4240.193

What version of the Carbon Design System are you using?

carbon-components: 10.23.2
carbon-components-react: 7.23.2

What offering/product do you work on? Any pressing ship or release dates we
should be aware of?

Steps to reproduce the issue

See this sandbox: https://codesandbox.io/s/tooltips-kpcbk?file=/src/index.js

  1. Click on the tooltip next to Text input (tooltip with no id) 1. Notice that the tooltip stays visible.
  2. Click on the tooltip next to Text input (tooltip with no id) 2. Notice that the tooltip appears for a brief moment and then disappears.

Screen Recording 2020-11-10 at 9 39 23 AM

This was discussed in this Slack thread, where it was suggested to add unique id props to each Tooltip. I tried this and it did fix the disappearing tooltip issue (play around with the Text input (tooltip with id) tooltips to see this), but it causes accessibility issues where you can no longer tab between text inputs (from tooltip to text input and so forth). In the case where tooltips do not have id props, tabbing is fine.

Screen Recording 2020-11-10 at 9 40 41 AM

@emyarod
Copy link
Member

emyarod commented Nov 19, 2020

rather than id can you try setting tooltipId instead? https://codesandbox.io/s/tooltips-forked-wmduk

@queeniema
Copy link
Author

Using tooltipId still causes tooltips to disappear.

Screen Recording 2020-11-19 at 8 11 10 AM

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

Successfully merging a pull request may close this issue.

2 participants