开发者

onclick issues with dijit.Tooltip

I am facing following issue. I h开发者_如何学JAVAave 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜