Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
Description
It is somewhat arbitrary to define direction as "forward" and "backward", and this enum is used almost exclusively for focus traversal. The only other place it is used is in the delete() method of TextArea and TextInput, which uses Direction.BACKWARD to represent "backspace". This makes some sense, but Direction.FORWARD doesn't really correspond to "delete". This method should instead take a boolean "backspace" argument that would be used to distinguish between backspace and delete. Then the only use of the Direction enum would truly be focus traversal, and the name "FocusTraversalDirection" is more appropriate.