Results 1 to 3 of 3

Thread: disabled selectfield acts as if enabled when navigated to using tab

Hybrid View

Previous Post Previous Post   Next Post Next Post
    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-3889 in a recent build.
  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    3
    Vote Rating
    0
      0  

    Default disabled selectfield acts as if enabled when navigated to using tab

    // bug / feature deficiency
    // disabled selectfield acts as if enabled when navigated to using tab key in chrome Version 23.0.1271.97 m

    // 'Ext.field.Select' file: Select.js


    onMaskTap: function() {

    //-----------------------------------------
    //if (this.getDisabled()) { move this to onFocus(e)
    // return false;
    //}
    //----------------------------------------------------
    this.onFocus();
    return false;
    }
    onFocus: function (e) {
    //- will handle tab navigation focus when selectfield is disabled
    if(this.getDisabled())
    {
    return false;
    }
    //--------- continue with original code
    var component =this.getComponent();
    this.fireEvent('focus',this, e);

    if
    (Ext.os.is.Android4){
    component.input.dom.focus();
    }
    component.input.dom.blur();
    this.isFocused =true;
    this.showPicker();
    }

    Test case:

    Code:
    Ext.Viewport.add({
        xtype : 'formpanel',
        items : [
            {
                xtype : 'textfield',
                label : 'Foo'
            },
            {
                xtype    : 'selectfield',
                label    : 'Choose one',
                disabled : true,
                options  : [
                    { text : 'First Option',  value : 'first'  },
                    { text : 'Second Option', value : 'second' },
                    { text : 'Third Option',  value : 'third'  }
                ]
            }
        ]
    });
    Last edited by mitchellsimoens; 8 Jan 2013 at 7:23 AM. Reason: Added testcase to post

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,316
    Vote Rating
    1291
      0  

    Default

    Also, you need to wrap code in BBCode CODE tags like I have done to the testcase.

    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,159
    Vote Rating
    7
      0  

    Default

    Thanks for the report and fix. This will be fixed in 2.2.

    Thank you!
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

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
  •