fbTooltip closes onClick

Page: 1

Author Post
Member
Registered: Dec 2010
Posts: 39
Location: Madrid, Spain
Byron,

I have noticed a different behavior on the tooltips. Until not so long ago (the last version I could test on is 5.2.1) a click on the opened tooltip would not close it. However, I have just noticed on the current version (5.3.4) that when you click on the opened tooltip this will close itself. This is a problem on my site. As you can see on http://www.apartinmadrid.com/en/accommodation/apartments/ if you rollover the apartments checkbox a tooltip will show several other checkboxes. With the current version clicking on any of these checkboxes will close the tooltip preventing the user on further selections.

Is there any way to prevent this (like contextCloseOnClick:false on fbContext) or to revert to the previous behavior?

Thank you once again for your support.
Administrator
Registered: Aug 2008
Posts: 3382
I should indeed introduce a tooltipCloseOnClick option, and will do so in the next release. In the meantime, you will need to use the version that has the desired behaviour baked in. There is no way to select that behaviour in the current release.
Member
Registered: Dec 2010
Posts: 39
Location: Madrid, Spain
Do you happen to remember whats the last version with that behavior? Also, if it is above 5.2.1 where could I download it?
Administrator
Registered: Aug 2008
Posts: 3382
5.2.1 was the most recent version that left tooltips open on click.
Member
Registered: Dec 2010
Posts: 39
Location: Madrid, Spain
Thanks.
Member
Registered: Apr 2009
Posts: 56
I thought I'd chime in on the tooltip close option. I'm addressing this at the moment on a site and it would be a great feature. May I suggest a tiny small X in the upper right corner of the tooltip rather than just having it close by clicking inside the tooltip pane. An X is intuitive to most surfers. This alleviates the issue with casual clickers who accidently click in the tooltip pane and they didn't want it to close. In order to get the tooltip back they would have to reload the floatbox window because you wouldn't want it to reactivate on mouseover again. This scenario also helps retain workable Href links inside the tooltip.

If an X was an option to use, I would think you would want a lot smaller graphic than the default X used by Floatbox due to the fact that most (not all) tootips are relatively small panes. Perhaps a PNG image that actually overlays the graphics or content of the pane and has a low opacity value for the background color so the content shines through. I'm thinking somewhere in the 30-50% range. This is a guess at the opacity value. It would need some fiddling to see what it looks like. You may frown upon overlaying an X on content, but most panes will have some padding and it actually looks good in real life. I have a video player that has this feature. I can send you an example if you want.

I'll make the graphics if you need 'em done. But then I'm maybe meddling in someone else's playground here?
Administrator
Registered: Aug 2008
Posts: 3382
I've already done some rationalization of the click-to-close behaviour for subsequent Floatbox releases. Here's the dirt...

I previously had two click-to-close options, one for images and one for context boxes - imageClickCloses and contextCloseOnClick. There was nothing that applied to tooltips or other HTML content. I have replaced these with a broadly applicable closeOnClick option that can be applied to any content type except media (videos) and cross-domain iframes. (As always, for compatibility with existing markup the two previous options will continue to work, but won't be in the documentation.) The default is false, so to get an image, tooltip, context box, whatever to close on click, the option will have to be explicitly set to true.

As for the small X to close option, I don't think I'm on board with this one. It's not that I don't think such an X would not be useful in some contexts, but rather I think this should be handled by the content creator, not by Floatbox. The approach you took for the video player is the right one. This close button is in the content area and is involved in user interaction with that content. Floatbox should not mess with that.

The advantage of leaving such a close X in the hands of the content creator is that it can be visually and operationally integrated with the rest of the content. Sure, a small translucent X might be just the thing for your video player, but maybe not for something that may have decoration in that corner, or an awkward color scheme, or perhaps a help button already placed there. Leaving it in the hands of the content creator would let such a close widget be placed anywhere and look any way the designer wanted, as appropriate to the content being shown. For example, the close widget could be a cancel button in an "Submit" "Cancel" pair of buttons at the bottom of a small form. Or, it might be important to some folks to make it more visible and friendly for small-screen touch device users.

It's really easy to have any element within a floatbox's content close that box. (And remember, tooltips and context boxes are floatboxes too.) Just assign an onclick action of "fb.end()".

Page: 1