FULL PRODUCT VERSION :
C:\Program Files\Java\jdk1.8.0_102\bin>java -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
C:\Windows\System32>ver
Microsoft Windows [Version 10.0.15063]
A DESCRIPTION OF THE PROBLEM :
In Java 8u40 the Spinner control was updated to accept the arrow keys for cycling elements. This functionality does not appear to work with numbers when the spinner is editable. Editable spinners in Swing do work with the up and down arrow keys from my testing.
The following StackOverflow post indicates the problem:
https://stackoverflow.com/questions/30597345/how-to-enabled-up-down-keys-in-a-javafx-spinner-component
The documentation for Spinner states "The keyboard up/down arrow keys also cycle through the elements."
https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/Spinner.html
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a Spinner with an Integer or Double value factory that has the property editable="true".
2. Focus the Spinner and press the up and down arrow keys on the keyboard.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The Spinner would increment/decrement accordingly.
ACTUAL -
The Spinner does not change and the cursor is moved left to the beginning of the field.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Declare a custom event listener as demonstrated in the StackOverflow answer.
C:\Program Files\Java\jdk1.8.0_102\bin>java -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
C:\Windows\System32>ver
Microsoft Windows [Version 10.0.15063]
A DESCRIPTION OF THE PROBLEM :
In Java 8u40 the Spinner control was updated to accept the arrow keys for cycling elements. This functionality does not appear to work with numbers when the spinner is editable. Editable spinners in Swing do work with the up and down arrow keys from my testing.
The following StackOverflow post indicates the problem:
https://stackoverflow.com/questions/30597345/how-to-enabled-up-down-keys-in-a-javafx-spinner-component
The documentation for Spinner states "The keyboard up/down arrow keys also cycle through the elements."
https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/Spinner.html
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a Spinner with an Integer or Double value factory that has the property editable="true".
2. Focus the Spinner and press the up and down arrow keys on the keyboard.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The Spinner would increment/decrement accordingly.
ACTUAL -
The Spinner does not change and the cursor is moved left to the beginning of the field.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Declare a custom event listener as demonstrated in the StackOverflow answer.