Results 1 to 3 of 3

Thread: 4.1.1 RC2 keyup event locks text field input

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Ext JS Premium Member
    Join Date
    Sep 2009
    Location
    Cypress, California
    Posts
    238
    Vote Rating
    102
      0  

    Default 4.1.1 RC2 keyup event locks text field input

    Hello, I have a text field to which I'm applying a keyup event in a form via code like this:

    Code:
            /* "defaults" below contained w/in form creation
            defaults: {
                enforceMaxLength: true,
                enableKeyEvents: true,
                emptyText: 'New...',
                listeners: {
                    keyup: {
                        scope: this,
                        fn: function (field, event, options) {
                               return true;
                        }
                    }
                }
            },
            items: [
                {
                        /* form items like text fields, combo boxes, etc */
                    }
    The behavior that I'm experiencing is that only the first typed keystroke is appearing when I press a key. Subsequent keystrokes are not appearing although the event is being called. A field.getValue() call only reveals the first keystroke.

    This simple code worked in EXTJS 3.4 quite well. Here's my field definition w/in the form:

    Code:
    {
       xtype: 'textfield',
       fieldLabel: 'PO Number',
       name: 'poNumber',
       id: 'poNumber'
    }
    Has something changed? This also fails in EXTJS 4.1 GA.

    -Doug

  2. #2
    Ext JS Premium Member
    Join Date
    Sep 2009
    Location
    Cypress, California
    Posts
    238
    Vote Rating
    102
      0  

    Default enforceMaxLength is messing this up

    From the documentation:

    Code:
    maxLength : NumberMaximum input field length allowed by validation. This behavior is intended to provide instant feedback to the user by improving usability to allow pasting and editing or overtyping and back tracking. To restrict the maximum number of characters that can be entered into the field use theenforceMaxLength option.
    
    
    Defaults to Number.MAX_VALUE.
    
    So, when a maxLength is not set this implies that maxLength should be some humungo number by default. However, the behavior only allows me to type one character when enforceMaxLength is applied. When enforceMaxLength is false everything works OK. I think this is a bug.

  3. #3
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,390
    Vote Rating
    498
      0  

    Default

    If you believe this to be a bug, please create a small working example we can run and using the following template:
    http://www.sencha.com/forum/showthre...o-report-a-bug

    Regards,
    Scott.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •