1. #1
    Ext User benny_boi's Avatar
    Join Date
    May 2007
    Posts
    24
    Vote Rating
    0
    benny_boi is on a distinguished road

      0  

    Question ComboBox causing "blur" event when clicking on it's expand button

    ComboBox causing "blur" event when clicking on it's expand button


    Hi All,

    Firstly, I have to say that ext library has blown me away for the incredibly polished things it achieves!

    One small thing I noticed when I was playing with forms in [v1.0.1a]...

    For my application, I find that validation firing before a user has finished completing a field is a little premature, so I set a global behaviour to cause validation on field blur with the following code:

    Code:
     
        Ext.form.Field.prototype.validationEvent = 'blur';
    This works exactly as expected except with ComboBoxes. When you click the little button to expand the box, it causes a blur event (and therefore validation) because the focus has gone off the actual entry box. This causes validation warnings when the user hasn't yet had a chance to choose a value.

    Not sure if there's an undocumented event I should use instead of "blur" for ComboBoxes to get around this, or whether the textbox and expand button should be considered as a single entity for firing off events, but would welcome the guru's thoughts on this.

    Keep up the great coding guys!

    Cheers,

    Ben

  2. #2
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,161
    Vote Rating
    322
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    The validation event is the configurable option. See http://extjs.com/deploy/ext/docs/output/Ext.form.Field.html#configs.

    You should post into Bugs forum only if you are 100% sure it's the bug and, ideally, together with a proposed solution. Otherwise to Help forum if you have a specific question or you need a help on a specific matter or to General Discussion forum if you have questions about basic design philosophy.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Blessing and Curse of refs, Grid MultiSearch Plugin


  3. #3
    Ext User benny_boi's Avatar
    Join Date
    May 2007
    Posts
    24
    Vote Rating
    0
    benny_boi is on a distinguished road

      0  

    Default Alternative to "blur" to validate when user leaving field?

    Alternative to "blur" to validate when user leaving field?


    I understand that I can configure the valiationEvent - just cant find burried in the docs a better alternative to "blur", or I'd override validationEvent on the indiviual fields that are misbehaving (ie: ComboBoxes).

    Tripping "blur" validation when someone clicks on something within the control seems inconsistent behaviour -as technically the focus has only been lost from an individual DOM object - not the ComboBox itself.

    And sorry - I'm still stretching my brain to appreciate the work these guys have put in - if I had already devised the solution I would happily share it.

  4. #4
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,161
    Vote Rating
    322
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    OK, let's have an Ext team member to aswer if this behavior is by design, if it's bug, or else. I'm interested too as I'm going to implement both client and server side validations soon.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Blessing and Curse of refs, Grid MultiSearch Plugin


  5. #5
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    Let me see if I have this right - you override the default validation and set it to blur, then post in bugs when the field is validating when it is blurred? Clicking on the trigger is blurring the form field, Ext cannot control that.
    Jack Slocum
    Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum
    jack@extjs.com

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar