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

Node.requestFocus() is honored for a disabled node

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • fx1.2
    • None
    • javafx
    • None

      A disabled node is not supposed to respond to user inputs such as key and mouse inputs. So a disabled node should never gain focus. However, calling requestFocus() on a disabled node makes the node gain focus and all keyevents are delivered to the node.

      When honoring the requestFocus call, it has to be checked whether the node is enabled and focusable.

      I have attached a sample test. Clicking the checkbox would disable nodes such as circle, group, image view etc. Now click on any of the disabled nodes and press keys. If you see key event messages on the console, bug is reproduced.

      I reproduced it on WinXP SP3 - JavaFX SDK b41 - jdk6u10-b33

        1. duke.gif
          4 kB
          Praveen Mohan
        2. NodeDisableTest.fx
          5 kB
          Praveen Mohan

            idk Igor Kushnirskiy (Inactive)
            pmohan Praveen Mohan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: