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

Not to hide tooltip when mouse is hovering on it #111

Open
lorasandberg opened this issue Jan 11, 2013 · 5 comments
Open

Not to hide tooltip when mouse is hovering on it #111

lorasandberg opened this issue Jan 11, 2013 · 5 comments

Comments

@lorasandberg
Copy link

When using "area-mouseout" or "image-mouseout" setting on tooltipClose the tooltip gets closed after mouseoutDelay even if mouse is hovering on the tooltip. This is quite troublesome if the tooltip contains for example links. Is there a simple way to prevent this?

Great plugin by the way.

@jamietre
Copy link
Owner

Probably best to use the "area-click" mouseout option in this situation. I may not be understanding exactly what is happening but it sounds like what is supposed to be happening. When using area-mouseout, at least, the tooltip is supposed to close when the area becomes unhighlighted.

@lorasandberg
Copy link
Author

Yeah, I understand that this is how it's technically supposed to work. But wouldn't it make more sense if the tooltip stayed visible when user has the mouse hovered on it? That basically means that the user has moved his focus to it. After all many mouse hover applications in the web, for example hover tab navigation, works like this.

Also the tooltip closes if the tooltipClose setting is 'image-mouseout' and the mouse goes over the tooltip even though the mouse doesn't actually go outside the borders of the image. As web developer it's clear to me why this happens as the onmouseout event gets fired in situations like this. However I suppose it doesn't really make sense from the user's view, since they didn't really move mouse outside of the image.

@jamietre
Copy link
Owner

The logic for this quickly gets complicated. The basic idea is a tooltip is associated with an area; it's not supposed to work like a menu. So when you move out of an area, the tooltip by default hides. Just by nature of your using mouseoutdelay, this doesn't happen right away.

But as far as imagemapster is concerned, they are out of the area. So right now, there's no reason to ever check if someone's hovering on a tooltip, because it would only matter if mouseoutDelay was active --- the only possible way you could hover on a tooltip before it was hidden was if this option was active.

I am sure this could be added as another option - it just isn't something that I'd ever needed before; the original intent of the tooltips was just an easy way to show details about a hotspot, and the area-click was added as a catchall way to keep them active. You can also use the API to show and hide tooltips yourself so it shouldn't be too hard to code this functionality externally.

@lorasandberg
Copy link
Author

Yes, it isn't really an issue if mouseoutDelay isn't set to more than zero. And typically tooltips are often just small texts similar to the hover effect of title attribute of HTML elements. However I think that the tooltips of the plugin could have a bit wider use than this. I'm currently using them to provide few links with short descriptions related to the image map for the user.

But yeah, I guess this is more of a feature suggestion than an issue report.

@jamietre
Copy link
Owner

I'm actually a bit torn on the tooltip module - some time ago when I found imagemapster getting pretty big I broke a few major features (tooltip, resizing) into modules so you could create builds with only the features you need. I never really kept on top of this and so while it's nice for organization I don't think the modules are totally decoupled.

But the tooltips part of it does have some nice features now, and I've actually never really found a general-purpose tooltip plugin that I've liked using. (Or one that understands imagemap areas). So I guess I agree with you, it could be built out into something that stands on its own.

On the other hand it feels a bit silly to create yet another tooltip library in 2012...

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

2 participants