Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Navigation over tabs stops on disabled tab

    Hello,

    I ran against an issue where navigation over tabs (with arrow keys) stops when a disabled tab is encountered.

    We are on SNAPSHOT_v8.3d_2012-07-03/Pro Deployment (built 2012-07-03).

    The case can be illustrated with the following code:
    Code:
    	public Canvas getViewPanel() {
    		
            final TabSet topTabSet = new TabSet();  
            topTabSet.setTabBarPosition(Side.TOP);  
            topTabSet.setTabBarAlign(Side.LEFT);  
            topTabSet.setWidth(400);  
            topTabSet.setHeight(200);  
      
            final Tab preferencesTab = new Tab("Preferences");  
            DynamicForm preferencesForm = new DynamicForm();  
            CheckboxItem useTabsCheckbox = new CheckboxItem();  
            useTabsCheckbox.setTitle("Use Smart GWT tabs");  
            preferencesForm.setFields(useTabsCheckbox);  
            preferencesTab.setPane(preferencesForm);
            
            final Tab disabledTab = new Tab("Disabled");
            DynamicForm disabledForm = new DynamicForm();
            TextItem disabledTextItem = new TextItem();
            disabledForm.setFields(disabledTextItem);
            disabledTab.setPane(disabledForm);
            disabledTab.setDisabled(true);
      
            final Tab profileTab = new Tab("Profile");  
            DynamicForm profileForm = new DynamicForm(); 
            profileForm.setAutoFocus(true);
            TextItem nameTextItem = new TextItem();  
            nameTextItem.setTitle("Your Name");  
            nameTextItem.addChangedHandler(new ChangedHandler() {  
                public void onChanged(ChangedEvent event) {  
                    String newTitle = (event.getValue() == null ? "" : event.getValue() + "'s ") + "Preferences";  
                    topTabSet.setTabTitle(preferencesTab, newTitle);  
                }  
            });  
            profileForm.setFields(nameTextItem);  
            profileTab.setPane(profileForm);  
      
            topTabSet.addTab(profileTab);
            topTabSet.addTab(disabledTab);
            topTabSet.addTab(preferencesTab);
      
            VLayout vLayout = new VLayout();  
            vLayout.setMembersMargin(15);  
            vLayout.addMember(topTabSet);  
            vLayout.setHeight("auto");  
              
            vLayout.draw(); 
    		
    		return vLayout;
    	}
    I would expect that one can navigate to the third tab?

    thanks!
    Last edited by Isomorphic; 16 Jul 2012, 09:10. Reason: formatting code block

    #2
    We are not reproducing this with the latest code.
    We have (very recently) made a change to how focus / navigation is handled for Tabsets which may have resolved this issue since the build you refer to. Could you try with the latest nightly build and let us know if you're still seeing the bug.
    If so, please be sure to let us know what browser/OS you're testing against, and also whether the bug occurs in compiled mode or if it only occurs in dev mode.

    Thanks
    Isomorphic Software

    Comment


      #3
      Thanks, we will try that.

      The behavior is observed both in dev and compiled mode.
      I am testing this on FF10 but it was also noticed in IE8. I will see if it also happens in IE9 but I think it will.

      I'll get back to you with more results.

      Comment


        #4
        This is working now, thanks!

        Comment

        Working...
        X