1. #1
    Ext User
    Join Date
    Dec 2008
    Posts
    3
    Vote Rating
    0
    maloi is on a distinguished road

      0  

    Default [2.2.x][CLOSED] FileUploadField textfield has width 0 when render hidden

    [2.2.x][CLOSED] FileUploadField textfield has width 0 when render hidden


    sample code, that shows render problem
    HTML Code:
    <html>
    <head>
      <title>Example</title>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
        <link rel="stylesheet" type="text/css" href="resources/css/ext-all.css" />
        <link rel="stylesheet" type="text/css" href="file-upload.css" />
         <script type="text/javascript" src="adapter/ext/ext-base.js"></script>
        <script type="text/javascript" src="ext-all.js"></script>
        <script type="text/javascript" src="FileUploadField.js"></script>
        <script type="text/javascript">
        Ext.BLANK_IMAGE_URL = 'resources/images/default/s.gif';
        </script>
        <script type="text/javascript" src="test.js"/>
    </head>
    <body>
    </body>
    </html>
    test.js:
    PHP Code:
     Ext.onReady(function(){
    var 
    form = new Ext.form.FormPanel({
        
    fileUpload:true,
        
    hidden:true,
    //if hidden:false textfield shows normal
        
    items:[{xtype:'fileuploadfield',
    width:200}]
    //if we not define width textfield also shows normal
        
    });
    button = new Ext.Button({
        
    text:'show',
        
    handler:function(){
            
    form.show();
        }
    });


    new 
    Ext.Viewport({
            
    layout'border',
            
    items: [{xtype:'panel',region:'center',items:[form],buttons:[button]}]
        });
    }); 
    after render hidden text field has style width:0 that not changes after it comes visible
    when form renders visible width calculates correctly.
    Attached Images

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    89
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Add hideMode:'offsets' to the FormPanel config.

  3. #3
    Ext User
    Join Date
    Dec 2008
    Posts
    3
    Vote Rating
    0
    maloi is on a distinguished road

      0  

    Default


    it helps in firefox, but in IE 6 and 7 this option result to form not visible at all

    in my big application this option not helps in firefox too (there form not hidden - it's part of card layout but behaviour looks like)

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    89
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    You need to add hideMode:'offsets' to containers that are actually hidden (e.g. the items of a card layout/tabpanel or collapsible regions of a border layout).

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi