opentip icon indicating copy to clipboard operation
opentip copied to clipboard

Multiple tooltips clashing with one another

Open abyx opened this issue 12 years ago • 13 comments

I have a table with a tooltip for each row, on hover. I noticed that on some cases I have to hover on specific parts of the row to get the tooltip to show. Digging further, I saw that plugin placed a tooltip div on top of the rows, hidden, and that div was catching the hover events and so the tooltips weren't being displayed.

Is there a way to make the library place tooltips in the DOM only on hover, and remove them once they are hidden?

abyx avatar Mar 12 '13 08:03 abyx

Hi. That's actually what opentip does (except for the removal: once inserted they stay there forever). I fixed a similar bug recently. Are you sure that you're using the absolute latest version of opentip?

enyo avatar Mar 12 '13 09:03 enyo

@enyo thanks for the fast reply :) I'm using 2.2.7, which I downloaded yesterday. That's the latest, right?

abyx avatar Mar 12 '13 09:03 abyx

Yep. Weird. What browser are you using and what adapter?

enyo avatar Mar 12 '13 09:03 enyo

No adapter and latest chrome. I see that when a tooltip is hidden, it's visibility is set to visible, which means it's still there catching events. I was thinking about changing the css to add display: none to it when it's hidden

abyx avatar Mar 12 '13 09:03 abyx

I guess you mean that you're using the native adapter? No jquery library or similar. Hidden tooltips have display:none;. But maybe there's a bug where they never reach the actual hidden stage. Are those tooltips having the class hiding or hidden? And are you sure that none of your own CSS declarations interfere with opentip?

enyo avatar Mar 12 '13 09:03 enyo

There are no CSS interferences, AFAICS. It do see that indeed sometimes the tooltip gets stuck as "hiding" and doesn't get to "hidden", which is what's causing the issue. I do not see any errors in the console when this happens. It gets "fixed" if I hover over the element again, causing the tooltip to show and then hide again properly.

abyx avatar Mar 12 '13 09:03 abyx

That's so weird! I just fixed this bug #32. I'll have to take a look at it at work. Can you provide a publicly accessible site where I can test it?

enyo avatar Mar 12 '13 09:03 enyo

I'm sorry, I can't publish the code publicly. FWIW, I've just tried increasing the delay I set from 0.1 to 0.2 and I can't seem to get it to reproduce.

abyx avatar Mar 12 '13 09:03 abyx

Maybe my spiritual involvement fixed the bug?

enyo avatar Mar 12 '13 09:03 enyo

Setting the delay to 0.1 again I can sometimes get it to happen, but with 0.2 I can't. Seems like a timing issue?

abyx avatar Mar 12 '13 09:03 abyx

Damn. I was hoping for supernatural powers. Yeah. It's a timing issue where the actual 'hide' timeout gets somewhat canceled. There has to be a separate call to actually hide the tooltip because if I was setting the property display:none immediately you wouldn't be able to see hide effects like fade out. I'll look into it. Please try to create a sample page (ideally jsfiddle) to demonstrate the problem as concise as possible.

enyo avatar Mar 12 '13 09:03 enyo

FWIW, it was just reproduced with 0.2 delay as well. Just makes it more rare.

abyx avatar Mar 12 '13 14:03 abyx

I'm getting this as well

KevinAHM avatar Jul 14 '24 17:07 KevinAHM