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: Both 'focus' and 'hover' events cannot be set at the same time #3241

Closed
sylven32 opened this issue Sep 5, 2022 · 2 comments · Fixed by #3243
Closed

Tooltip: Both 'focus' and 'hover' events cannot be set at the same time #3241

sylven32 opened this issue Sep 5, 2022 · 2 comments · Fixed by #3243
Assignees
Labels
Type: New Feature Issue contains a new feature or new component request
Milestone

Comments

@sylven32
Copy link

sylven32 commented Sep 5, 2022

Describe the feature you would like to see added

Trying to migrate from reactstrap UncontrolledTooltip, the main impediment is about the triggering event which, by default, is supporting both focus and hover.
If we could get PrimeReact tooltip to support the two events with the same component instance, that would be great: users with a mouse could get extra info quickly, as well as keyboard-only ones who would see the tooltip as soon as the target element focus is focused.
As for the API, the event prop could accept an array of string or a new constant like 'both' or even a parseable array like 'focus,hover' (and vice-versa)?

Is your feature request related to a problem?

That's unfortunate that we would have to double the number of tooltips to get one support hover event and the other one focus event.

Describe the solution you'd like

No response

Describe alternatives you have considered

No response

Additional context

No response

@sylven32 sylven32 added Status: Discussion Issue or pull request needs to be discussed by Core Team Type: New Feature Issue contains a new feature or new component request labels Sep 5, 2022
melloware added a commit to melloware/primereact that referenced this issue Sep 5, 2022
@melloware melloware self-assigned this Sep 5, 2022
@melloware melloware added Core Team Issue or pull request has been *opened* by a member of Core Team and removed Status: Discussion Issue or pull request needs to be discussed by Core Team labels Sep 5, 2022
@melloware melloware added this to the 8.5.0 milestone Sep 5, 2022
@melloware
Copy link
Member

melloware commented Sep 5, 2022

Good suggestion I just added a new option both if you want it on both hover and focus

@sylven32
Copy link
Author

sylven32 commented Sep 6, 2022

Thanks!

@mertsincan mertsincan removed the Core Team Issue or pull request has been *opened* by a member of Core Team label Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Feature Issue contains a new feature or new component request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants