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

Tooltip component does not work with disabled Button component #27451

Closed
ecgan opened this issue Dec 2, 2020 · 3 comments · Fixed by #27529
Closed

Tooltip component does not work with disabled Button component #27451

ecgan opened this issue Dec 2, 2020 · 3 comments · Fixed by #27529
Assignees
Labels
Needs Accessibility Feedback Need input from accessibility Needs Design Feedback Needs general design feedback. [Package] Components /packages/components [Type] Enhancement A suggestion for improvement.

Comments

@ecgan
Copy link
Contributor

ecgan commented Dec 2, 2020

Describe the bug

Tooltip component does not work with disabled Button component:

Steps to reproduce:

/**
 * External dependencies
 */
import { Tooltip, Button } from '@wordpress/components';

const MyComponent = () => {
	return (
		<Tooltip text="Show helpful text here">
			<Button disabled>Click me</Button>
		</Tooltip>
	);
};

export default MyComponent;
  1. Create a React component like the above MyComponent.
  2. Use the component in your React page.
  3. Open up a browser, navigate to the React page, hover your mouse over the disabled "Click me" button. Expect the tooltip to show up, but it does not.
  4. Remove the disabled prop, and reload the page. The tooltip will show up as expected.

Expected behavior

Tooltip should appear when I hover over the disabled button.

@grzim grzim self-assigned this Dec 3, 2020
@grzim
Copy link
Contributor

grzim commented Dec 3, 2020

@ecgan, I think I have found the solution to this problem. Can you please write what are the steps you did to see this issue, so I can test it in the same scenario?

@ecgan
Copy link
Contributor Author

ecgan commented Dec 4, 2020

@grzim , I have updated the description with more details. Let me know if you need more info.

@talldan talldan added [Package] Components /packages/components [Type] Bug An existing feature does not function as intended labels Dec 7, 2020
@draganescu draganescu added [Type] Enhancement A suggestion for improvement. Needs Accessibility Feedback Need input from accessibility Needs Design Feedback Needs general design feedback. and removed [Type] Bug An existing feature does not function as intended labels Dec 7, 2020
@draganescu
Copy link
Contributor

This does not appear to be a bug, as @grzim noted, this was expressly tested against. I don't have enough context to say much, but I added some labels to get attention here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Accessibility Feedback Need input from accessibility Needs Design Feedback Needs general design feedback. [Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants