Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    hoverHTML containing hrefs?

    Hi,
    I see even in the SmartClient reference that you can hover on certain component names and at hover a text will be shown describing that component.
    However if that html contains links there in no way to click on them because the hoverHTML is hidden as soon as you mouse out.
    You can see that as example here:
    http://www.smartclient.com/docs/6.5/a/b/c/go.html#class..ListGrid
    and if you hover on "DataBoundComponent" you will see there is no way to click on the link "common set of APIs".
    Is there any possibility to position the hoverHTML differently so it will not hide?
    I want to use the hoverHTML functionality on a ListGrid.

    Thanks,
    Andras.

    #2
    If you want something that doesn't auto-dismiss, use the cellHover event of the ListGrid and show something with a dismiss button, like a Window or Dialog.

    Be sure to also set showHover:false to prevent the default hovers.

    Comment


      #3
      I realize my response is 6 years too late... but it's the closest discussion I could find to the problem I just solved for myself. I wanted to put an href in my tooltip, but I couldn't figure out how to enable users to click it because the tooltip would disappear before they could get their mouse to the link. All the tooltips in the SmartClient Reference website have this problem.

      I looked for some way to keep the tooltip up using some CSS styling (e.g. transition or animations) and although it seems possible with pure CSS (i.e. no JavaScript) I couldn't get it to work. Here's a working example of what I'm describing. Maybe I didn't try hard enough, and maybe the way SmartClient handles it makes such an approach impossible. Either way, I figured I'd go for a more SmartClient-esque approach before working even harder on a pure CSS.

      I didn't really want a Window or Dialog as prescribed here because I don't need the user to click a "close" button, and it would be annoying to force them to do it every time the hover appears.

      Here's what I implemented in my FormItem, which seems to work for me:
      Code:
                     prompt:htmlStringWithHref,
                     stopHover: function(){
                        //overrides the isc.Hover.clear
                     },
      the hover will still disappear if the mouse moves far enough away, but if the user can move their mouse to the hover before it disappears then the hover will stay. It doesn't look like there are any unintended consequences because the hover clears when I move the mouse off the item and off the hover.

      Comment

      Working...
      X