Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8134842

Disabled Tabs are selectable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 8u60
    • 8u51
    • javafx
    • x86_64
    • windows_7

      FULL PRODUCT VERSION :
      JDK 1.8.0_51

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      I have an application where I use a TabPane from JavaFX.
      I have two Tabs, the second one is disabled by my application.

      I select the enabled Tab-header in the TabPane and after this I use the shortcut for tab-back (ctrl+shift+tab).
      Then the disabled Tab is getting selected.

      ADDITIONAL REGRESSION INFORMATION:
      java version "1.8.0_51"

      - JDK 1.8.0_51 is included within Eclipse

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      - create a TabPane
      - add 2 Tabs
      - disable the second Tab
      - select the first Tab-header
      - press ctrl+shift+tab (shortcut for tab-back)
      -> Disabled tab is getting selected

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Disabled Tab should not be selectable
      ACTUAL -
      Disabled Tab got selected

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      No crash logs

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      @FXML private TabPane tabPane;

      @FXML private Tab tab1;
      @FXML private Tab tab2;


      private void initTabs() {
        tabPane.getSelectionModel().select(tab1);
        tab2.setDisable(true);
      }

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Maybe the first answer in this post from stackoverflow:
      http://stackoverflow.com/questions/19025268/javafx-tabpane-switch-tabs-only-when-focused

            jgiles Jonathan Giles
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: