-<html>
-<head>
- <title>The source code</title>
- <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
- <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
-</head>
-<body onload="prettyPrint();">
- <pre class="prettyprint lang-js">/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-<div id="cls-Ext.SplitButton"></div>/**\r
+<html>\r
+<head>\r
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> \r
+ <title>The source code</title>\r
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body onload="prettyPrint();">\r
+ <pre class="prettyprint lang-js"><div id="cls-Ext.SplitButton"></div>/**\r
* @class Ext.SplitButton\r
* @extends Ext.Button\r
* A split button that provides a built-in dropdown arrow that can fire an event separately from the default\r
},\r
\r
isClickOnArrow : function(e){\r
- return this.arrowAlign != 'bottom' ?\r
- e.getPageX() > this.el.child(this.buttonSelector).getRegion().right :\r
- e.getPageY() > this.el.child(this.buttonSelector).getRegion().bottom;\r
+ if (this.arrowAlign != 'bottom') {\r
+ var visBtn = this.el.child('em.x-btn-split');\r
+ var right = visBtn.getRegion().right - visBtn.getPadding('r');\r
+ return e.getPageX() > right;\r
+ } else {\r
+ return e.getPageY() > this.btnEl.getRegion().bottom;\r
+ }\r
},\r
\r
// private\r
\r
// private\r
isMenuTriggerOver : function(e){\r
- return this.menu && e.target.tagName == 'em';\r
+ return this.menu && e.target.tagName == this.arrowSelector;\r
},\r
\r
// private\r
isMenuTriggerOut : function(e, internal){\r
- return this.menu && e.target.tagName != 'em';\r
+ return this.menu && e.target.tagName != this.arrowSelector;\r
}\r
});\r
\r
-Ext.reg('splitbutton', Ext.SplitButton);</pre>
-</body>
+Ext.reg('splitbutton', Ext.SplitButton);</pre> \r
+</body>\r
</html>
\ No newline at end of file