views:

227

answers:

1

I am facing following issue. I have attached tooltips with some tab titles of a dijit.TabContainer. The hover behavior is OK, but when I click on the tab, the tooltip stays visible unless I click somewhere else on the page.

On googling I got following page discussing this issue. http://ahackersnotes.com/web/hide-dojo-tooltip-after-a-mouse-click-by-extending-dijittooltip.html.

But the solution provided there didn't seem to work (at least in my case). Is there some other solution (may be a subclass solution) which could handle this?

A: 

I think I figured out one solution as follows:

dojo.provide("my.Tooltip");
dojo.require("dijit.Tooltip");
dojo.declare("my.Tooltip" , [ dijit.Tooltip ] ,
{
  _onFocus: function(/*Event*/ e){
    this.inherited(arguments);
    this._focus = false;
  }
});

Its working for me. I don't know for sure if it can cause any other problem in the tooltips.

Shailesh Kumar