Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-9262 in a recent build.
  1. #1
    Ext JS Premium Member
    Join Date
    Jun 2011
    Location
    St. Louis
    Posts
    212
    Vote Rating
    9
    jimmylu98 will become famous soon enough

      0  

    Default 4.2.0: drag/drop plugins cause grid focus and scrollbar reset with prevent focus

    4.2.0: drag/drop plugins cause grid focus and scrollbar reset with prevent focus


    Before add plugins: { ptype: 'gridviewdragdrop' }, with preserveScrollOnRefresh: true, and preventFocus: true, remote grid work fine.
    After add plugins: { ptype: 'gridviewdragdrop' }, there are two problems: (1) grid always focus to selected row, not the field user try to type, (2) scrollbar reset to top. Tested with FF and Chrome.
    4.1.1a and 3.4.x are fine.

    Steps to test:
    (1) Load the program,
    (2) select any row,
    (3) focus to 'Company Name' and type
    (4) You will lose focus to 'Company Name' when grid reload data.
    (5) scroll down to bottom,
    (6) You will see scroll bar reset to top when grid reload data.

    See attached simple test code and grid-filter.json.zip data.

    PHP Code:
    Ext.onReady(function() {

        
    Ext.define('Product', {
            
    extend'Ext.data.Model',
            
    fields: [{
                
    name'id',
                
    type'int'
            
    }, {
                
    name'company'
            
    }, {
                
    name'price',
                
    type'float'
            
    }, {
                
    name'date',
                
    type'date'
            
    }, {
                
    name'visible',
                
    type'boolean'
            
    }, {
                
    name'size'
            
    }]
        });

        var 
    store Ext.create('Ext.data.JsonStore', {
            
    model'Product',
            
    proxy: {
                
    type'ajax',
                
    url'grid-filter.json',
                
    reader: {
                    
    type'json',
                    
    root'data',
                   
    totalProperty:'totalCount'
                
    }
            },
            
    remoteSortfalse,
            
    sorters: [{
                
    property'company',
                
    direction'ASC'
            
    }]
        });
      
        var 
    grid Ext.create('Ext.grid.Panel', {
            
    borderfalse,
            
    storestore,
            
    columns: {
                
    defaults: { sortabletrue }, 
            
    items: [{
                        
    dataIndex'id',
                        
    header'Id',
                
    flxe1,
                }, {
                        
    dataIndex'company',
                        
    header'Company',
                
    flxe1,
                        
    id'company'
                
    }, {
                        
    dataIndex'price',
                
    flxe1,
                        
    header'Price'
                
    }, {
                        
    dataIndex'size',
                
    flxe1,
                        
    header'Size'
                
    }, {
                        
    dataIndex'date',
                
    flxe1,
                
    header'Date',
                        
    rendererExt.util.Format.dateRenderer('m/d/Y')   
                }, {
                        
    dataIndex'visible',
                
    flxe1,
                        
    header'Visible'
                
    }]
        },
        
    viewConfig: {    
            
    plugins: {
                           
    ptype'gridviewdragdrop',
                
    dragGroup'DDdrop'
            
    },
            
    loadMaskfalse,
            
    emptyText'No Data Found'
            
    stripeRowstrue,
            
    preserveScrollOnRefreshtrue
        
    },
        
    selModel:{ 
            
    preventFocustrue
        
    },
            
    listeners: {
                 
    render: {
                        
    fn: function(){
                            
    Ext.TaskManager.start({
                                    
    run: function(){ 
                                        
    console.info' reload data!' );
                            
    store.load({ params: { start0limit50 } });
                                    },
                                    
    interval2000
                               
    });
                          }
                    }
            },
            
    title'Grid Filters Example',
            
    height400,
            
    layout'fit'
        
    });

        var 
    form Ext.create('Ext.form.Panel', {
        
    layout'anchor',
            
    borderfalse,
            
    defaultType'textfield',
            
    bodyPadding5,
            
    width650,
            
    items: [{
                
    fieldLabel'Company Name',
                
    name'to',
                
    anchor:'100%' 
            
    },{
                
    fieldLabel'Notes',
                
    name'subject',
                
    anchor'100%' 
            
    }, grid],
        
    renderToExt.getBody(),
        });
    }); 
    Attached Files

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,397
    Vote Rating
    849
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

Thread Participants: 1