Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-7204 in a recent build.
  1. #1
    Sencha User
    Join Date
    Oct 2011
    Location
    Brazil
    Posts
    3
    Vote Rating
    0
    duduweiland is on a distinguished road

      0  

    Default Filefield remains disabled

    Filefield remains disabled


    Ext version tested:
    • Ext 4.1.1
    Browser versions tested against:
    • Chromium 22.0.1231.0
    • Firefox 15.0.1
    Description:
    • a filefield created initially disabled remains disabled forever. It works fine, just its style is like it was disabled.
    Steps to reproduce the problem:
    • Create a filefield with config disabled: true
    • In code, try to enable this field
    • Now, the field is enabled but appears as disabled
    The result that was expected:
    • The field should be enabled
    The result that occurs instead:
    • the field remains disabled, but only in styles (you can select a file normally)
    Additional CSS used:
    • only default ext-all.css
    Test Case:

    Code:
    Ext.create('Ext.panel.Panel', {
        renderTo: Ext.getBody(),
        height: 200,
        width: 320,
        bodyPadding: 10,
        title: 'Panel',
        items: [
            {
                xtype: 'filefield',
                disabled: true,
                id: 'file'
            }
        ],
        dockedItems: [
            {
                xtype: 'toolbar',
                dock: 'top',
                items: [
                    {
                        xtype: 'button',
                        text: 'Disable field',
                        listeners: {
                            click: function() {
                                Ext.getCmp('file').disable();
                            }
                        }
                    },
                    {
                        xtype: 'button',
                        text: 'Enable field',
                        listeners: {
                            click: function() {
                                Ext.getCmp('file').enable();
                            }
                        }
                    }
                ]
            }
        ]
    }).show();

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,057
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    In 4.1.2 the button does show as enabled however when you click on it it doesn't allow for you to choose a file.

    I have opened a bug in our bug tracker.

    Great test case!

  3. #3
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,057
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Have this fixed for 4.1.3.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Tags for this Thread