1. #1
    Ext User
    Join Date
    Aug 2009
    Posts
    11
    Vote Rating
    0
    deepakramana.r is on a distinguished road

      0  

    Default Combobox disappears on disable in IE 7

    Combobox disappears on disable in IE 7


    I want to disable a combobox.

    Ext.getCmp(elmID).disable();

    When I do this the combobox disappears in IE 7. Please help

  2. #2
    Sencha User KenHuffman's Avatar
    Join Date
    Aug 2008
    Posts
    11
    Vote Rating
    0
    KenHuffman is on a distinguished road

      0  

    Default I get the same problem on IE8

    I get the same problem on IE8


    I've got the same problem. Calling setDisabled(true) on an Ext.form.ComboBox, makes it disappear on IE8. Commenting out the call, and the component does not disappear. Works fine for Firefox.

    [I even put the call to setDisabled(true) in a few second DelayTask() by itself to verify it was the culprit. It disappeared when the task fired.]

    Anyone have a fix?

  3. #3
    Ext User
    Join Date
    Aug 2009
    Posts
    11
    Vote Rating
    0
    deepakramana.r is on a distinguished road

      0  

    Default


    Hi,

    Ext.getCmp(elmID).disabled = true;
    Ext.getCmp(elmID).setEditable(false);

    This worked

  4. #4
    Sencha User KenHuffman's Avatar
    Join Date
    Aug 2008
    Posts
    11
    Vote Rating
    0
    KenHuffman is on a distinguished road

      0  

    Default Better solution

    Better solution


    Setting it to non-editable does not make it appear disabled. Here is a workaround that does.

    Clone the x-item-disabled CSS:
    Code:
    .x-item-disabled-ie {
        color:gray;cursor:default;opacity:.6;-moz-opacity:.6; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
    }
    Then use
    Code:
    disabledClass: Ext.isIE ? 'x-item-disabled-ie' : 'x-item-disabled'
    in the ComboBox's config.

  5. #5
    Sencha User
    Join Date
    Oct 2007
    Posts
    60
    Vote Rating
    0
    Gozer is on a distinguished road

      0  

    Default Same issue, but no luck with suggested solutions

    Same issue, but no luck with suggested solutions


    I tried both of the solutions suggested, but neither seemed to have any effect at all. Has anyone found a better fix?

    Code:
    {
    	fieldLabel: 'Status',
    	hiddenName: 'status_id',
    	xtype: 'combo',
    	store: status_store,
    	valueField: 'id',
    	displayField: 'name',
    	typeAhead: true,
    	mode: 'local',
    	triggerAction: 'all',
    	allowBlank: true,
    	selectOnFocus: true,
    	forceSelection: true,
    	value: 0
    	,disabled: true
    },{
    	xtype: 'panel',
    	border: false,
    	html: '<br />'
    },{
    	fieldLabel: 'Status #1 Date',
    	name: 'status_1_date',
    	xtype: 'datefield',
    	width: 100
    	,disabled: true
    },{
    	fieldLabel: 'Status #1',
    	name: 'status_1',
    	allowBlank: true,
    	xtype: 'textarea',
    	height: 60
    	,disabled: true
    },{
    	xtype: 'panel',
    	border: false,
    	html: '<br />'
    },{
    	fieldLabel: 'Status #2 Date',
    	name: 'status_2_date',
    	xtype: 'datefield',
    	width: 100
    	,disabled: true
    },{
    	fieldLabel: 'Status #2',
    	name: 'status_2',
    	allowBlank: true,
    	xtype: 'textarea',
    	height: 60
    	,disabled: true
    },{
    	xtype: 'panel',
    	border: false,
    	html: '<br />'
    },{
    	fieldLabel: 'Status #3 Date',
    	name: 'status_3_date',
    	xtype: 'datefield',
    	width: 100
    	,disabled: true
    },{
    	fieldLabel: 'Status #3',
    	name: 'status_3',
    	allowBlank: true,
    	xtype: 'textarea',
    	height: 60
    	,disabled: true
    }
    Thanks,
    Gary
    Attached Images

  6. #6
    Sencha User
    Join Date
    Feb 2008
    Posts
    36
    Vote Rating
    0
    johnrembo is on a distinguished road

      0  

    Default


    additional notice

    this happens on IE7/8 with
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    (none of fixes above works)

    while with i.e. following doctype declaration everything's working fine (no fix necessary):
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN" "http://www.w3.org/TR/html4/strict.dtd">

    any solution?

  7. #7
    Sencha - Architect Dev Team
    Join Date
    Jan 2009
    Location
    Frederick, Maryland
    Posts
    901
    Vote Rating
    32
    jminnick has a spectacular aura about jminnick has a spectacular aura about

      0  

    Default


    this.setDisabled(true);
    this.setEditable(false);

    worked for me (IE7)

  8. #8
    Sencha User
    Join Date
    Jan 2009
    Location
    Ukraine
    Posts
    58
    Vote Rating
    0
    Yazla is on a distinguished road

      0  

    Default


    Hi.
    I have the same trouble, and i am wondering is there some "official" fix? or just workaround?



    Thanks.

    Cheers.

  9. #9
    Ext User
    Join Date
    Oct 2010
    Posts
    1
    Vote Rating
    0
    sencha10 is on a distinguished road

      0  

    Exclamation This is still a bug in 3.3.1!

    This is still a bug in 3.3.1!


    Hey Ext developers, anyone?

    Found out that having a different hiddenName and id solves my problem.
    In your example the id was not set. Try to make sure both are unique among all elements.
    i.e. try
    ...
    hiddenName:'status_name',
    id:'status_id'
    Last edited by sencha10; 14 Jan 2011 at 11:57 AM. Reason: Added my working work-around

  10. #10
    Sencha User jagadeesha's Avatar
    Join Date
    Jan 2011
    Location
    Bangalore , Trianz
    Posts
    10
    Vote Rating
    0
    jagadeesha has a little shameless behaviour in the past

      -1  

    Default


    .x-item-disabled {
    filter:'' !important;
    }

    This worked for me