Ext.override(Ext.menu.Menu, { showAt : function(xy, parentMenu, _e) { this.parentMenu = parentMenu; if (!this.el) { this.render(); } if (_e !== false) { this.fireEvent("beforeshow", this); xy = this.el.adjustForConstraints(xy); } this.el.setXY(xy); var maxHeight = Ext.getBody().getHeight() - xy[1]; if (this.el.getHeight() > maxHeight) { this.el.setHeight(maxHeight); this.el.applyStyles('overflow-y: auto;'); } this.el.show(); this.hidden = false; this.focus(); this.fireEvent("show", this); }, autoWidth : function() { if(/^\d+$/.test(this.width + '')) { this.width += "px"; } }});
联系客服