X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..6e39d509471fe9b4e2660e0d1631b350d0c66f40:/src/widgets/SplitButton.js diff --git a/src/widgets/SplitButton.js b/src/widgets/SplitButton.js index b5a1ab3b..b0cde67e 100644 --- a/src/widgets/SplitButton.js +++ b/src/widgets/SplitButton.js @@ -1,5 +1,5 @@ /*! - * Ext JS Library 3.0.3 + * Ext JS Library 3.1.0 * Copyright(c) 2006-2009 Ext JS, LLC * licensing@extjs.com * http://www.extjs.com/license @@ -81,9 +81,13 @@ Ext.SplitButton = Ext.extend(Ext.Button, { }, isClickOnArrow : function(e){ - return this.arrowAlign != 'bottom' ? - e.getPageX() > this.el.child(this.buttonSelector).getRegion().right : - e.getPageY() > this.el.child(this.buttonSelector).getRegion().bottom; + if (this.arrowAlign != 'bottom') { + var visBtn = this.el.child('em.x-btn-split'); + var right = visBtn.getRegion().right - visBtn.getPadding('r'); + return e.getPageX() > right; + } else { + return e.getPageY() > this.btnEl.getRegion().bottom; + } }, // private @@ -112,12 +116,12 @@ Ext.SplitButton = Ext.extend(Ext.Button, { // private isMenuTriggerOver : function(e){ - return this.menu && e.target.tagName == 'em'; + return this.menu && e.target.tagName == this.arrowSelector; }, // private isMenuTriggerOut : function(e, internal){ - return this.menu && e.target.tagName != 'em'; + return this.menu && e.target.tagName != this.arrowSelector; } });