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

Feature Request: Tooltip Multi-Target Support #775

Open
AllanKerr opened this issue Aug 10, 2020 · 0 comments
Open

Feature Request: Tooltip Multi-Target Support #775

AllanKerr opened this issue Aug 10, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@AllanKerr
Copy link
Contributor

Tooltip Multi-Target Support

What do we want to do?

Allow tooltips to have multiple targets so that hovering / focusing any of the targets will trigger the tooltip. Changing for to support multiple targets like for="id1 id2 id3 id4" would allow for this.

Why do we want to do this?

In some cases it makes more sense to display a single tooltip for multiple elements rather than a tooltip for each. Currently this can be done but it requires manually handling events for anything that isn't the tooltip's target and calling show() / hide().

multitarget

What challenges are involved?

The primary challenge is how to position the tooltip relative to multiple targets.

Option 1:

Compute the smallest rectangle that includes all targets. This will likely result in good positioning but might cause issues where the pointer doesn't point to any of the targets.

Option 2:

Always position relative to the first target and only use the others for focus / hover events.

@AllanKerr AllanKerr added the enhancement New feature or request label Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant