Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Issue with TextItem mask and cursor position

    Hello,

    I'm using a TextItem with a numeric mask like the following:

    Code:
    TextItem textItem = new TextItem();
    textItem.setMask("#######");
    The problem is that when a user puts focus into that field, the cursor is located at the end of the text field and not at the beginning. So you always have to manually go to the beginning of the field to be able to enter a number.

    Therefore, I am wondering if there is a way to (programmatically) put the cursor to the first position when a field receives focus?

    By the way, this problem only occurs in the current Smart GWT version I am using (2.5 power edition, nightly build from 2011/09/25). In previous versions, the cursor is positioned correctly at the beginning.

    #2
    We're not reproducing this against the latest 2.5 nightly build using the following simple test code:
    Code:
    import com.google.gwt.core.client.EntryPoint;
    import com.smartgwt.client.widgets.form.DynamicForm;
    import com.smartgwt.client.widgets.form.fields.TextItem;
    
    public class TextMask implements EntryPoint {
    
        @Override
        public void onModuleLoad() {
            DynamicForm form = new DynamicForm();
            TextItem item1 = new TextItem();
            TextItem textItem = new TextItem();
            textItem.setMask("#######");
            TextItem item2 = new TextItem();
            form.setItems(item1, textItem, item2);
            form.draw();
            
        }
    
    }
    In this case - putting focus in the item with the mask by tabbing through the form items does the right thing -- focus goes to the start of the mask, allowing the user to simply start typing in the value they want.

    Could you show us a runnable test case where this occurs and give us steps to reproduce it? Also can you let us know what Browser / OS you're seeing the problem on

    Thanks
    Isomorphic Software

    Comment


      #3
      Thank you for your help!
      It seems that an update to the latest nightly build has resolved the issue.

      Comment

      Working...
      X