Results 1 to 8 of 8

Thread: hideTab/unhideTab issues in Firefox

  1. #1
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661

    Default hideTab/unhideTab issues in Firefox

    When I hide multiple tabs and then unhide them, firefox is aligning them vertically while IE works fine.

    After doing some research, Firefox does not like "block" to be set for table elements. TR's are a particular issue I've seen mentioned (http://www.andyjarrett.co.uk/andy/bl.../Css-Js-and-tr), and I'm guessing TD's are also problematic the results are very ugly.

    In TabPanel.js the offending function

    Code:
        setHidden : function(hidden){
            this.hidden = hidden;
            this.pnode.setStyle('display', hidden ? 'none' : 'block');  
        },
    Looks like since we are dealing with table elements, you should either store the style before any of this is done or perhaps just change 'block' to ''. The blank seems to work fine for me as a workaround for now.

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854

    Default

    Are you using the latest code (RC3)? I'm using FF and I don't see this issue. Are you calling hide/unhide to do this or are you trying to manipulate the styles?

  3. #3
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661

    Default

    Perhaps you aren't in strict mode, Firefox is going to enforce the proper table display property in strict mode...

    After more research, it makes sense that this is happening. The mistake made is that table elements are not block elements. The CSS 2.1 specification explains why this is happening, you are forcing a table-cell display style into a block display style http://www.w3.org/TR/CSS21/visuren.html#display-prop. The correct style is "table-cell" but I'm not sure how that would work for backward compatibility. So storing the original style and using that might be more appropriate. Blanking out the style seems to work as well.

    Yes, using RC3. I'm specifically calling the hideTab and unhideTab functions (which both call setHidden that I referenced). If you take a tab bar with multiple tabs, hide them all, and unhide them you will see this behavior. I have tested it with both 1.5 and 2.0 versions of firefox.

  4. #4
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    Setting the display style to "" is the recommended way of restoring default display style. The source should be changed to do this. Bump this thread when Jack returns.

  5. #5
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854

    Default

    Yeah, it's not even an issue of strict vs quirks - broken either way. I've added to this to my list of bugs for Jack to look when he returns - hopefully he won't have to go thru a week's worth of posts

  6. #6
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661

    Default

    Excellent.

    Also, while I'm at it...

    I need to have the ability to rearrange the tab order. Do you have any recommended way of doing this without tearing down the tabItems and re-inserting them? Shuffle the order of td's within the tr or something to that effect would be the desired result, but I'm not sure what the best way of going about that would be. I'd be happy to contribute whatever I come up with when I'm done.

  7. #7
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854

    Default

    It doesn't look like there's a built in way to do this. I suppose you could access the internal collection, rearrange it, and then rebuild the TabPanel. You could then do addTabItem instead of addTab to eliminate rebuilding the tab. Just guessing here - haven't tried this.

    Maybe the add methods need to support an optional index so you could insert wherever you want.

  8. #8
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956

    Default

    I will fix the display issue as soon as I get back.

Similar Threads

  1. ToolBar issues
    By rodiniz in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 8 Mar 2007, 5:01 AM
  2. Rev 8: Toolbar issues with IE7?
    By js1234224 in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 22 Feb 2007, 5:28 AM
  3. Resizing issues in BasicDialog on non-firefox
    By alexw in forum Ext 1.x: Bugs
    Replies: 2
    Last Post: 13 Feb 2007, 6:22 PM
  4. Issues with ASP.NET
    By ca8msm in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 20 Dec 2006, 6:21 AM
  5. Strange CSS issues with Firefox and WebDeveloper extention
    By tryanDLS in forum Community Discussion
    Replies: 1
    Last Post: 30 Nov 2006, 1:49 PM

Posting Permissions

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