Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 370527

Summary: DecimalTextRidget: Difficulties entering negative numbers on Windows
Product: [RT] Riena Reporter: Peter Kullmann <peter.kullmann>
Component: UIAssignee: Nobody - feel free to take it <nobody>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P3 CC: nobody
Version: 3.0.0   
Target Milestone: ---   
Hardware: Macintosh   
OS: Windows 7   
Whiteboard:

Description Peter Kullmann CLA 2012-02-03 03:03:37 EST
Our customers have difficulties when trying to enter negative numbers into a IDecimalTextRidget on Windows 7 (and SWT). They start with a minus sign and then the cursor jumps over the decimal point and prevents further input. 

In more detail (for a DecimalTextRidget with precision 2 and a model value of 0):
- The ridget contains the text "0.00" and the whole text is selected
- User enters "-"
- The text box displays "-.00" and the selection is collapsed, the cursor is on the right edge (after the two zeros)
- Any numeric digit that the user enters leads to a red flash since the ridget accepts only two decimals

I think the input of a minus sign should switch the number to negative and should not alter the selection. Entering the Keys "-120" should lead to "-120.00" for example. 

On Cocoa it works well. Here, entering "-" leads to "-|.00" where | denotes the cursor.