Results 1 to 2 of 2

Thread: [6.2.1] Later enabled active card doesn't have the tab highlighted

    You found a bug! We've classified it as EXTJS-24491 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium User
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    807

    Post [6.2.1] Later enabled active card doesn't have the tab highlighted

    In a tabpanel, should an active card which is initially disabled and later enabled have the tab highlighted ? I think yes. Because when enabling or disabling a card, the tab highlighter is not removed, which if to consider current scenario, then would mean to have inconsistency in the code, and more than this in order to highlight the tab is needed to deactivate and then activate it back.

    So when the tabpanel is initialized, the first card was configured as active and disabled at the same time.
    The highlight is skiped becuase of the tab.disabled check:
    Code:
        setActiveTab: function(tab, initial) {
            var me = this;
    
    
            if (!tab.disabled && tab !== me.activeTab) {
    Later when enabled, the tab is not highlighted because the setActiveTab returns earlier.
    Code:
        setActiveTab: function(card) {
            var me = this,
                previous;
     
            // Check for a config object 
            if (!Ext.isObject(card) || card.isComponent) {
                card = me.getComponent(card);
            }
            previous = me.getActiveTab();
            if (card) {
                Ext.suspendLayouts();
                // We may be passed a config object, so add it. 
                // Without doing a layout! 
                if (!card.isComponent) {
                    card = me.add(card);
                }
     
                //THE PREVIOUS IS THE SAME AS CARD, SO RETURNS WITHOUT HIGHLIGHTING THE TAB
                if (previous === card || me.fireEvent('beforetabchange', me, card, previous) === false) {
                    Ext.resumeLayouts(true);
                    return previous;
                }
    https://fiddle.sencha.com/#view/editor&fiddle/1lu9

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

Similar Threads

  1. Active tab not highlighted with lazy items
    By cpiepka in forum Ext JS 6.x Bugs
    Replies: 2
    Last Post: 25 Oct 2016, 1:42 AM
  2. Tabbar active item enabled ?
    By azche in forum Sencha Touch 2.x: Q&A
    Replies: 0
    Last Post: 28 Jun 2012, 7:39 AM
  3. active card in viewport?
    By nofx in forum Sencha Touch 1.x: Discussion
    Replies: 6
    Last Post: 9 Aug 2011, 7:09 AM
  4. Replies: 1
    Last Post: 9 Apr 2011, 3:12 AM
  5. Card Layout - resize w/Set Active
    By jt1088 in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 3 Nov 2010, 8:25 AM

Tags for this Thread

Posting Permissions

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