X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6e39d509471fe9b4e2660e0d1631b350d0c66f40..6a7e4474cba9d8be4b2ec445e10f1691f7277c50:/docs/source/Editor.html diff --git a/docs/source/Editor.html b/docs/source/Editor.html index 5550cd01..c85f52e6 100644 --- a/docs/source/Editor.html +++ b/docs/source/Editor.html @@ -1,12 +1,18 @@ - - - - The source code - - - - -
/** + + + + The source code + + + + +
/*!
+ * Ext JS Library 3.2.0
+ * Copyright(c) 2006-2010 Ext JS, Inc.
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
/** * @class Ext.Editor * @extends Ext.Component * A base editor field that handles displaying/hiding on demand and has some built-in sizing and event handling logic. @@ -34,8 +40,9 @@ Ext.extend(Ext.Editor, Ext.Component, {
/** * @cfg {Boolean} allowBlur * True to {@link #completeEdit complete the editing process} if in edit mode when the - * field is blurred. Defaults to false. + * field is blurred. Defaults to true. */ + allowBlur: true,
/** * @cfg {Boolean/String} autoSize * True for the editor to automatically adopt the size of the underlying field, "width" to adopt the width only, @@ -204,7 +211,7 @@ Ext.extend(Ext.Editor, Ext.Component, { this.cancelEdit(); } if(field.triggerBlur){ - field.triggerBlur(); + field.triggerBlur(); } } this.fireEvent('specialkey', field, e); @@ -293,6 +300,10 @@ Ext.extend(Ext.Editor, Ext.Component, { if(!this.editing){ return; } + // Assert combo values first + if (this.field.assertValue) { + this.field.assertValue(); + } var v = this.getValue(); if(!this.field.isValid()){ if(this.revertInvalid !== false){ @@ -338,7 +349,7 @@ Ext.extend(Ext.Editor, Ext.Component, { this.fireEvent("canceledit", this, v, this.startValue); } }, - + // private hideEdit: function(remainVisible){ if(remainVisible !== true){ @@ -349,7 +360,8 @@ Ext.extend(Ext.Editor, Ext.Component, { // private onBlur : function(){ - if(this.allowBlur !== true && this.editing){ + // selectSameEditor flag allows the same editor to be started without onBlur firing on itself + if(this.allowBlur === true && this.editing && this.selectSameEditor !== true){ this.completeEdit(); } }, @@ -388,12 +400,12 @@ Ext.extend(Ext.Editor, Ext.Component, { beforeDestroy : function(){ Ext.destroyMembers(this, 'field'); - + delete this.parentEl; delete this.boundEl; } }); Ext.reg('editor', Ext.Editor); -
- +
+ \ No newline at end of file