/*!
- * Ext JS Library 3.0.0
+ * Ext JS Library 3.1.0
* Copyright(c) 2006-2009 Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
/**\r
* @class Ext.QuickTip\r
* @extends Ext.ToolTip\r
+ * @xtype quicktip\r
* A specialized tooltip class for tooltips that can be specified in markup and automatically managed by the global\r
* {@link Ext.QuickTips} instance. See the QuickTips class header for additional usage details and examples.\r
* @constructor\r
this.clearTimer('show');\r
}\r
},\r
+ \r
+ getTipCfg: function(e) {\r
+ var t = e.getTarget(), \r
+ ttp, \r
+ cfg;\r
+ if(this.interceptTitles && t.title && Ext.isString(t.title)){\r
+ ttp = t.title;\r
+ t.qtip = ttp;\r
+ t.removeAttribute("title");\r
+ e.preventDefault();\r
+ }else{\r
+ cfg = this.tagConfig;\r
+ ttp = t.qtip || Ext.fly(t).getAttribute(cfg.attribute, cfg.namespace);\r
+ }\r
+ return ttp;\r
+ },\r
\r
// private\r
onTargetOver : function(e){\r
if(!t || t.nodeType !== 1 || t == document || t == document.body){\r
return;\r
}\r
- if(this.activeTarget && t == this.activeTarget.el){\r
+ if(this.activeTarget && ((t == this.activeTarget.el) || Ext.fly(this.activeTarget.el).contains(t))){\r
this.clearTimer('hide');\r
this.show();\r
return;\r
this.delayShow();\r
return;\r
}\r
- \r
- var ttp, et = Ext.fly(t), cfg = this.tagConfig;\r
- var ns = cfg.namespace;\r
- if(this.interceptTitles && t.title){\r
- ttp = t.title;\r
- t.qtip = ttp;\r
- t.removeAttribute("title");\r
- e.preventDefault();\r
- } else{\r
- ttp = t.qtip || et.getAttribute(cfg.attribute, ns);\r
- }\r
- if(ttp){\r
+ var ttp, et = Ext.fly(t), cfg = this.tagConfig, ns = cfg.namespace;\r
+ if(ttp = this.getTipCfg(e)){\r
var autoHide = et.getAttribute(cfg.hide, ns);\r
this.activeTarget = {\r
el: t,\r
\r
// private\r
onTargetOut : function(e){\r
+\r
+ // If moving within the current target, and it does not have a new tip, ignore the mouseout\r
+ if (this.activeTarget && e.within(this.activeTarget.el) && !this.getTipCfg(e)) {\r
+ return;\r
+ }\r
+\r
this.clearTimer('show');\r
if(this.autoHide !== false){\r
this.delayHide();\r
delete this.activeTarget;\r
Ext.QuickTip.superclass.hide.call(this);\r
}\r
-});
\ No newline at end of file
+});\r
+Ext.reg('quicktip', Ext.QuickTip);
\ No newline at end of file