-
8 Aug 2007 1:47 PM #11
Thanks for the detailed explanation. Here's an idea: What about changing onFocus to this:
Does that solve the issue?Code:onFocus : function(){ if(!Ext.isOpera){ // don't touch in Opera this.el.addClass(this.focusClass); } if(!this.hasFocus){ this.hasFocus = true; this.startValue = this.getValue(); this.fireEvent("focus", this); } }
-
8 Aug 2007 5:52 PM #12
yep it does

once again, elegant!
[edit]
just in case anyone's monitoring this thread,
here's the complete temp override to fix DateField's change event firing
Code:Ext.override(Ext.form.Field, { onFocus : function() { if (!Ext.isOpera) { // don't touch in Opera this.el.addClass(this.focusClass); } if (!this.hasFocus) { this.hasFocus = true; this.startValue = this.getValue(); this.fireEvent("focus", this); } }, onBlur : function() { this.beforeBlur(); this.el.removeClass(this.focusClass); this.hasFocus = false; if (this.validationEvent !== false && this.validateOnBlur && this.validationEvent != "blur") { this.validate(); } var v = this.getValue(); if (String(v) !== String(this.startValue)) { this.fireEvent('change', this, v, this.startValue); } this.fireEvent("blur", this); } });
Sencha Docs / Ext 3.x - ( Docs | Examples )
Learning Center / Saki's Examples (for 2.x) / HOWTO - ( Report Bugs | Post Proper Code )
-
11 Sep 2007 9:35 PM #13
-
23 Oct 2007 7:37 AM #14
I'm using this fix to execute on 'change' for a ComboBox. It works (thank you!!!) except in the case where I backspace the current selection.
I've got allowBlank:true and forceSelection:true. Backspacing the selection so that the field is empty is an acceptable value (because allowBlank:true), but it does not fire the 'change' event.
Any ideas on how to fix this?
-
28 Oct 2007 8:40 AM #15
IIRC, forceSelection and allowBlank are mutually exclusive.
it doesn't make sense to say "it's ok if it's blank, but you have to make at least 1 selection".
you'll also notice that once forceSelection is true, your field will never be blank once a selection has been made. HTH.
Sencha Docs / Ext 3.x - ( Docs | Examples )
Learning Center / Saki's Examples (for 2.x) / HOWTO - ( Report Bugs | Post Proper Code )
-
31 Oct 2008 5:54 AM #16
why Ext.form.DateField at ext 1.1 dose not work very well at ff3
the calancder window width very big and its make troubles
how to fix it
regards
-
25 May 2010 7:36 AM #17
I ran into the same issue with the ComboBox not firing the onChange event when a user manually enters text in the field (using GWT-EXT version 2.0.6). Here is a post of the tweak I made to the above code to resolve it.


Reply With Quote