javascriptextjs2

Extjs 2.3 Combobox Multi Selection clears when screen clicked elsewhere


Having a strange issue with a plugin that enables a combobox to allow multiple selections, the plugin is LovCombo, I have it working to the point where I can pick multiple selections, if I collapse the combobox with the down arrow I see the selections remain in the combobox, if I make selections though and then click anywhere outside the combobox then the values vanish!

Issue can be seen at http://jsfiddle.net/5Asf4/12/

Ext.onReady(function () {

var lc = new Ext.ux.form.LovCombo({
     id:'lovcombo'
    //,width:300
    ,fieldLabel: 'Test Data'
    ,hideOnSelect:false
    //,maxHeight:200
    ,store:[
         [1, 'Personnel []']
        ,[11, 'Finance (33)']
        ,[5, 'Door']
        ,[6, 'Door Panel']
        ,[2, 'Management !77']
        ,[25, 'Production']
        ,[3, 'Users']
        ,[20, 'Window']
        ,[21, 'Window Panel']
        ,[22, 'Form Panel']
        ,[23, 'Grid Panel']
        ,[24, 'Data View Panel']
    ]
    ,triggerAction:'all'
    ,mode:'local'
});

var addAssetDialog = new Ext.Window( {
    id: 'maintenance_addAssetDialog',
    title: 'Test Multi Select Combobox',
    closeAction: 'hide',
    items:[
        {
            xtype: 'form',
            id: 'maintenance_addAssetForm',
            border: false, 
            bodyBorder: false,
            items: [
                lc
            ],
        }
    ],
    buttons:[
        {                           
            text: 'Cancel',
            disabled: true,
            handler: function ( ) {
            }, 
            scope: this
        },
        {
            text: 'Save',
            disabled: true, 
            handler: function ( ) {
            }, 
            scope: this 
        }
    ],
});

addAssetDialog.show();

}); //end onReady


Solution

  • found a fix from the sencha forums, comment by savva http://www.extjs.com/forum/showthread.php?p=427065#post427065

    add the following line to the config

    beforeBlur: Ext.emptyFn
    

    jsfilddle updated to show fix http://jsfiddle.net/shauncraig007/5Asf4/13/