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

Button loses focused look when Stage not focused

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • fx2.1
    • javafx

      When I have a small Stage with a TreeView and a Button on it, there's a distinct difference in behaviour when the Stage is not focused. When the TreeView was focused, one can still tell when the Stage loses focus as the highlighted item turns grey. When a Button was focused and the Stage loses focus, there's no way to tell the Button was focused.

      Now this seems to be "normal" in Windows atleast, but I'd like to explain my use case anyway. I'm writing a program that is infact controlled by something other than the keyboard or mouse (by remote control). This means that my program is in focus always, as it can at all times be controlled by remote. This works well for things like TreeView's, ListView's, but breaks down for other controls as they do not render their ":focused" style when the Stage itself does not have focus (unlike say, a TreeCell, which still appears ":focused").

      This means that as soon as the Stage is not focused, it is impossible to see where the cursor (the focus) is in my application -- but it IS still working, as navigating using the remote will still change the selected button, even though you cannot see it. I fear I will be forced to write my own ":focused" look, but that's gonna be hard when the whole system is going to be working against me (as event handlers dealing with focus for example donot fire when the Stage is not focused).

      Issue RT-5006 might also be relevant, and might be enough for the use case above.

            Unassigned Unassigned
            jhendrikx John Hendrikx
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported: