Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User matei's Avatar
    Join Date
    Jun 2008
    Location
    Cluj-Napoca
    Posts
    28
    Vote Rating
    0
    matei is on a distinguished road

      0  

    Default [OPEN-1143] FormPanel/Panel initial disabled in hbox, mask & position bug

    [OPEN-1143] FormPanel/Panel initial disabled in hbox, mask & position bug


    Found 2 bugs:
    on hbox layout with 2 disabled panels inside the position for second panel is not corect because of the cls : x-masked-relative of initial disabled component, if do manual setDisabled(false) for one of them then the position is OK. Also IE the this.el.mask(); does not work on initial disabled panel/form.

    PHP Code:
    function runTest(disabled){    
        var 
    items = [
            {
                
    fieldLabel'First Name'
            
    },{
                
    fieldLabel'Last Name'
            
    },{
                
    fieldLabel'Middle Name'
            
    }
        ];
        var 
    = new Ext.Window({
            
    title'disabled initial: ' disabled,
            
    width650,
            
    height500,
            
    layout'hbox',
            
    layoutConfig: {
                
    align:'stretch',
                
    padding:'15px 15px 145px 15px'
            
    },
            
    tbar: [{
                
    text'setDisabled Panel',
                
    handler: function(){
                    
    w.p.setDisabled(!w.p.disabled);
                }
            },
    '->',{
                
    text'setDisabled FormPanel',
                
    handler: function(){
                    
    w.f.setDisabled(!w.f.disabled);
                }
            }],
            
    defaults: {
                
    flex1,
                
    disableddisabled,
                
    frametrue
            
    },
            
    items: [
                {
                    
    xtype'panel',
                    
    ref'p',
                    
    title'Panel',
                    
    defaults: {
                        
    xtype'textfield',
                        
    width150
                    
    },
                    
    itemsitems
                
    },
                {
                    
    xtype'form',
                    
    ref'f',
                    
    title'FormPanel',
                    
    defaults: {
                        
    xtype'textfield',
                        
    width150
                    
    },
                    
    itemsitems
                
    }
            ]
        }).
    show();
    }

    Ext.onReady(function() {
        
        
    // bug on IE & FF because of initial cls = "x-masked-relative", that is removed after call setDisabled(false/true);
        
    new Ext.Button({
            
    renderToExt.getBody(),
            
    text'Run initial Disabled',
            
    handler: function(){
                
    runTest(true);
            }
        });
        
        new 
    Ext.Button({
            
    renderToExt.getBody(),
            
    text'Run manual setDisabled is OK',
            
    handler: function(){
                
    runTest(false);
            }
        });
        
    }); 
    Attached Images

  2. #2
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    18
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Your issue has been entered in Trac for review. Thank you for the report.

  3. #3
    Sencha User matei's Avatar
    Join Date
    Jun 2008
    Location
    Cluj-Napoca
    Posts
    28
    Vote Rating
    0
    matei is on a distinguished road

      0  

    Default


    Temporary I found a solution for initial disabled Panels:
    PHP Code:
    Ext.override(Ext.Component, {
        
    render Ext.Component.prototype.render.createSequence(function(){
            if(
    this.disabled && Ext.isIE){
                (function(){
                    
    // pass silent so the event doesn't fire the first time.
                    
    this.disable(true);
                }).
    defer(1this); // like java Thread.yield :)
            
    }
        })
    }); 

  4. #4
    Ext JS Premium Member
    Join Date
    May 2009
    Posts
    13
    Vote Rating
    0
    gregd72002 is on a distinguished road

      0  

    Default


    Thanks! Got the same problem... your solution seems to work for me as well.

  5. #5
    Sencha User matei's Avatar
    Join Date
    Jun 2008
    Location
    Cluj-Napoca
    Posts
    28
    Vote Rating
    0
    matei is on a distinguished road

      0  

    Default


    I made same changes on first fix:
    1) override only if IE not for all browsers (improve)
    2) fix small bug if this.disabled is changed in the meantime (fix)

    PHP Code:
    if (Ext.isIE) {
        
    Ext.override(Ext.Component, {
            
    renderExt.Component.prototype.render.createSequence(function () {
                if (
    this.disabled) {
                    (function () {
                        
    // pass silent so the event doesn't fire the first time.
                        
    if (this.disabled) { // this.disabled could be changed in the meantime
                            
    this.disable(true);
                        }
                    }).
    defer(1this); // like java Thread.yield :)
                
    }
            })
        });


Similar Threads

  1. Replies: 0
    Last Post: 8 Jul 2010, 8:12 AM
  2. [OPEN-909] Ext.Element#mask position wrong in IE
    By cyrilluce in forum Ext 3.x: Bugs
    Replies: 0
    Last Post: 27 Apr 2010, 6:54 PM
  3. Replies: 1
    Last Post: 25 Mar 2010, 10:41 PM
  4. Replies: 4
    Last Post: 8 Jan 2010, 2:28 AM
  5. [2.2] MessageBox and disabled panel mask z-index
    By aurelien in forum Ext 2.x: Bugs
    Replies: 2
    Last Post: 23 Jan 2009, 2:34 AM

Thread Participants: 2

Tags for this Thread