nijogeorgep / smartgwt

Automatically exported from code.google.com/p/smartgwt
0 stars 0 forks source link

TimeItem mask breaks on use of delete-key #492

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Using the delete-key in a TimeItem can make it impossible to enter text into it 
again. The colon symbol of the mask is delete and then the TimeItem won't 
accept any input (it is also impossible to re-enter the delete colon).

What steps will reproduce the problem?
1. Create a TimeItem with setUseMask(true)
2. Launch and put text input marker next to the colon symbol (":").
3. Use the delete-key to delete the symbol.
4. It is now impossible to enter a time into the TimeItem. The time will be 
entered with a underscore between the digits (i.e. "04_32") and when the focus 
is moved from the TimeItem, it resets the mask.

What is the expected output? What do you see instead?
Expected output is that the colon is ignored when using the delete key. Now it 
is instead deleted.

What version of the product are you using? On what operating system?
SmartGWT 2.2 + GWT 2.0.3 + Firefox 3.6.8 / Chrome 5.0.375.125 + Windows Vista

Please provide any additional information below.
Tried it in compiled mode with the same result.

Test case (from smartGWT Showcase):
 public void onModuleLoad() {  
         DynamicForm form = new DynamicForm();  
         form.setWidth(400);  

         TimeItem timeField = new TimeItem("timeItem", "Time");  
         timeField.setUseMask(true);  

         form.setFields(timeField);  

         form.draw();  
     }  

Original issue reported on code.google.com by JohanOPe...@gmail.com on 5 Aug 2010 at 2:54

GoogleCodeExporter commented 8 years ago
Fixed in latest nightly build.

Original comment by sanjiv.j...@gmail.com on 6 Aug 2010 at 9:40

GoogleCodeExporter commented 8 years ago
Is it possible to fix the same issue for the following classes:
com.smartgwt.client.widgets.form.fields.DateItem
com.smartgwt.client.widgets.form.fields.DateTimeItem
?

Is there any way to workaround this bug based on SmartGWT v 2.2, e.g. using 
delete key press handler or just invoke some setter method on the related 
objects?

Thanks in advance.

Original comment by wojciech...@o2.pl on 16 Nov 2010 at 9:49

GoogleCodeExporter commented 8 years ago

Original comment by smartgwt...@gmail.com on 21 Dec 2010 at 9:28