Results 1 to 3 of 3

Thread: setValue numeric for textarea

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-7877 in a recent build.
  1. #1
    Sencha User aiky.cc's Avatar
    Join Date
    Aug 2012
    Location
    Novokuznetsk, Russia
    Posts
    41

    Default setValue numeric for textarea

    Hi,

    when setValues({phones:1010101010}) for textarea {name:'phones'} fireBug says:

    value.replace is not a function
    Line 78864(ext-all-debug.js 4.1.1a)

    Code:
    78862    stripReturns: function(value){
    78863        if (value) {
    78864            value = value.replace(this.returnRe, '');
    78865        }
    78866        return value;
    78867   },

    Is this a bug?

    Test case:

    Code:
    new Ext.form.Panel({
        renderTo : document.body,
        items    : [
            {
                xtype : 'textareafield',
                name  : 'phones'
            },
            {
                xtype   : 'button',
                text    : 'setValues',
                handler : function(btn) {
                    var form = btn.up('form').getForm();
    
                    form.setValues({
                        phones : 1010101010
                    });
                }
            }
        ]
    });
    Last edited by mitchellsimoens; 1 Dec 2012 at 7:32 AM. Reason: added test case

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    Default

    I would expect it to work so I'm going to open a bug for it.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3
    Sencha User aiky.cc's Avatar
    Join Date
    Aug 2012
    Location
    Novokuznetsk, Russia
    Posts
    41

    Default

    ??, sounds good, thank you.

    While bug fixing:
    Code:
    Number.prototype.replace = function(){
      return this;
    };

Posting Permissions

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