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,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      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,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      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

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar