Results 1 to 2 of 2

Thread: [FIXED][3.x] isVisible problems

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    8
      0  

    Default [FIXED] [3.x] isVisible problems

    Originally questioned here:
    http://extjs.com/forum/showthread.ph...988#post316988


    I encounter similar problems with Ext 3.x on FF 3.0.8. Seems like the isStyle(DISPLAY) check might not be working properly.

    If you use hideMode:'visibility' then the check seems to work ok.

    This was my test code:
    Code:
    Ext.onReady(function(){
        
        t = new Ext.Toolbar({
            renderTo: document.body,
            items: [
                {
                    text: 'Button 1',
                    id: 'b1'
                },
                {
                    text: 'Button 2',
                    id: 'b2',
                    hidden: true
                },
                {
                    text: 'Button 3'
                },
                {
                    text: 'Button 4',
                    id: 'b4',
                    hideMode: 'visibility',
                    hidden: true
                }
            ]
        });
    
    
        /**
         * @cfg {String} hideMode
         * <p>How this component should be hidden. Supported values are "visibility" (css visibility), "offsets" (negative
         * offset position) and "display" (css display) - defaults to "display".</p>
         * <p>For Containers which may be hidden and shown as part of a {@link Ext.layout.CardLayout card layout} Container such as a
         * {@link Ext.TabPanel TabPanel}, it is recommended that hideMode is configured as "offsets". This ensures
         * that hidden Components still have height and width so that layout managers can perform measurements when
         * calculating layouts.</p>
         */
        //hideMode: 'display',
        
        //var vis = !this.isStyle(VISIBILITY,HIDDEN) && !this.isStyle(DISPLAY,NONE),
        
        console.info('b1:',Ext.getCmp('b1').isVisible()); // returns true (expected)
        console.info('b2:',Ext.getCmp('b2').isVisible()); // returns true (not expected)
        console.info('b4:',Ext.getCmp('b4').isVisible()); // returns false (expected)
       
    /*
    .x-hidden, .x-hide-offsets {
        position:absolute !important;
        left:-10000px;
        top:-10000px;
        visibility:hidden;
    }
    
    .x-hide-display {
        display:none !important;
    }
    
    .x-hide-visibility {
        visibility:hidden !important;
    }
     */   
        
    });

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,213
    Vote Rating
    1007
      0  

    Default

    This is fixed in SVN.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •