Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: focus() event not firing for Selectfield (Ext.field.Select) in ST2 PR2

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-1209 in a recent build.
  1. #11
    Sencha User
    Join Date
    Jun 2011
    Location
    Switzerland
    Posts
    16
    Vote Rating
    0
      0  

    Default

    Hey guys,

    As a workaround I just added a listener to the pickers show/hide event! Put this code on your Form.field.Select:

    Code:
        initialize: function()
        {
            // select picker
            var picker = null;
            if (this.getUsePicker()) {
                picker = this.getPhonePicker();
            } else {
                picker = this.getTabletPicker();
            }
    
            this.callParent(arguments);
    
            picker.on({
                scope: this,
                show: 'handleFocus',
                hide: 'handleHide'
            });
        },
    
        handleFocus: function()
        {
            this.addCls('pressed');
        },
    
        handleHide: function()
        {
            this.removeCls('pressed');
        }

  2. #12
    Sencha User
    Join Date
    Aug 2011
    Location
    Mumbai, India
    Posts
    120
    Vote Rating
    4
      0  

    Default

    Had the same bug for ages, I finally found what may be a temporary workaround for the solution.

    I have the listeners array in the configs which contains something on these lines.

    Code:
    listeners : {
    focus:function(p,e){
    //add this to the first line of your focus method document.activeElement.blur();
    }
    }
    I've tested this using both the selectfield and the pickerfield (where I was having the same issue), seems to work for me

Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •