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

V-tooltip does not close when the pointer no longer hovers over the element (multiple v-tooltips on one page). #1054

Open
timurerrant opened this issue Oct 11, 2024 · 3 comments

Comments

@timurerrant
Copy link

Using "floating-vue": "2.0.0-beta.24"
I have a long list of trading cards including different product info - price, description etc.
All of them using v-tooltip.
Normally if I hover over one of those element and hover off - tooltip behaves as it should, appears on hover, dissappears on un-hover.
But when I move the mouse over several v-tooltip containing elements some of them fire and the result is I have several opened tooltips while not hovering over any of them.
Any fix/help?

@AlexTilnenko
Copy link

AlexTilnenko commented Oct 21, 2024

have same problem with a sub menu and this props <Dropdown :triggers="['hover']" :popper-triggers="['hover']">

@reslear
Copy link

reslear commented Oct 28, 2024

CleanShot 2024-10-28 at 13 36 11

I have the same problem, only with closing.

@timurerrant
Copy link
Author

timurerrant commented Nov 11, 2024

My problem has been solved with adding unique 'showGroup' value to the tooltip computed object. Thus every time the new tooltip opens, the previous one closes.
As example:

<div v-tooltip="tooltip">example</div>

const tooltip = computed(() => {
return {
theme : 'card-tooltip',
container: '.block__right-top',
triggers : ['hover'],
content : 'example text content',
placement: 'bottom-end',
showGroup: price-${props.uuid},
};
});

*link to the floating-vue doc:
https://floating-vue.starpad.dev/api/#showgroup

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

No branches or pull requests

3 participants