PDA

View Full Version : [FIXED] Grids with multi selection mode lose selections when right-clicking



pbienick
24 Oct 2013, 4:45 AM
REQUIRED INFORMATION


Ext version tested:

Ext 4.2.2.1144


Browser versions tested against:

Chrome, latest version (OS X, Windows)
Firefox 24 (OS X, Windows)


DOCTYPE tested against:

strict


Description:

Grids with multi selection mode lose selections when right-clicking


Steps to reproduce the problem:
Unfortunately fiddle.sencha.com has not yet been updated with 4.2.2, else you could just paste in the code below

Run the code below in 4.2.2
Select more than one row
Right-click - notice how only the row you clicked on remains selected. This was not the case in prior versions


The result that was expected:

For all selected rows to remain selected as in previous versions


The result that occurs instead:

The selection changes to the row you clicked on


Test Case:

https://fiddle.sencha.com/#fiddle/160



Ext.application({
name : 'Fiddle',

launch : function() {
var store = Ext.create('Ext.data.Store', {
fields : ['name', 'email', 'phone', 'active'],
data : {
items : [
{ name : 'Lisa', email : 'lisa@simpsons.com', phone : '555-111-1224', active : true },
{ name : 'Bart', email : 'bart@simpsons.com', phone : '555-222-1234', active : true },
{ name : 'Homer', email : 'home@simpsons.com', phone : '555-222-1244', active : false },
{ name : 'Marge', email : 'marge@simpsons.com', phone : '555-222-1254', active : true }
]
},
proxy : {
type : 'memory',
reader : {
type : 'json',
root : 'items'
}
}
});

Ext.create('Ext.grid.Panel', {
title : 'Simpsons',
height : 200,
width : 400,
renderTo : Ext.getBody(),
store : store,
selType: 'rowmodel',
selModel: {
mode: 'MULTI'
},
columns : [
{ text : 'Name', dataIndex : 'name' },
{ text : 'Email', dataIndex : 'email', flex : 1 },
{ text : 'Phone', dataIndex : 'phone' },
{ xtype : 'checkcolumn', text : 'Active', dataIndex : 'active' }
]
});

}
});



Operating System:

OS X 10.8.5
Windows 7


I could really use a workaround for this.

Gary Schlosberg
24 Oct 2013, 2:51 PM
Thanks for the report! I have opened a bug in our bug tracker.

pbienick
31 Oct 2013, 5:42 AM
Strange - I never got an email notification for your response. Glad you were able to reproduce the bug, but would you happen to have any suggestions for how to work around this?

jordandev
26 Nov 2013, 10:13 AM
Yeah, a workaround for this would be great as it breaks a lot of expected behavior on grids and trees.

predator
7 Mar 2014, 4:23 PM
Any fix on that??

evant
7 Mar 2014, 5:15 PM
See: http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.selection.RowModel-cfg-ignoreRightMouseSelection

Pretty sure this is already fixed.

predator
21 Mar 2014, 7:19 AM
With me setting the suggested to true or false does not have effect and the selection is still cleared, and only the right clicked row remains selected.

However I have noticed that if holding SHIFT when right click the selection remains as it should.

this is my selmodel config:


selModel: {
selType: 'rowmodel',
mode: 'MULTI',
ignoreRightMouseSelection: true //false
},