PDA

View Full Version : scroll problem in grid with CellEditing plugin



Prorok
15 Feb 2013, 2:59 AM
Put my code in the 'code editor' and click 'live preview'.
start editing name in first row, without canceling edition (editor not hide) move mouse cursor in Panel1 and scroll the mouse wheel.
Defect: name textfield editor not cancel edition and move in Panel1.
it looks like a defect, right?

if mouse cursor remain in the grid and scroll a mouse wheel. then editing cancel, as expected.


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

Ext.create('Ext.container.Container', {
items: [{ xtype: 'panel', title: 'Panel1', height: 150 },Ext.create('Ext.grid.Panel', {
title: 'Simpsons',
store: Ext.data.StoreManager.lookup('simpsonsStore'),
columns: [
{header: 'Name', dataIndex: 'name', editor: 'textfield'},
{header: 'Email', dataIndex: 'email', flex:1,
editor: {
xtype: 'textfield',
allowBlank: false
}
},
{header: 'Phone', dataIndex: 'phone'}
],
selType: 'cellmodel',
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
})
],
height: 200,
width: 300
})],
height: 200,
autoScroll: true,
width: 200,
renderTo: Ext.getBody()
});

mitchellsimoens
15 Feb 2013, 6:52 AM
So you want the edit to be canceled when you scroll a different component?

Prorok
17 Feb 2013, 12:45 PM
I would like the edit not to be canceled and the editor would remain in the grid.
And I am sorry, I forgot mention, this bug has been reproduced in the v. 4.1.3

I have another problem with the trigger editor that create the window when I click the trigger. When the window has been showed and I do first click the editor disappears (stop editing), Do you know a solution of this problem or this not a bug?

evant
17 Feb 2013, 2:21 PM
Your post isn't really clear. If you start an edit and move the mousewheel nothing will happen, the editor will remain in place. This is because the grid has no knowledge of scrolling information of the parent container. Once you click the mouse anywhere, the editor will see it's some other part of the document and cancel it.

Moving this one to the help forums, doesn't look like a bug.

Prorok
18 Feb 2013, 12:27 PM
you were able to reproduce the defect?
if you think that flying editor:
41926

not a bug, then I am very confused!

I understand why the editor remain in place, and I think, it isn't the consumer issue...

prijithkr
21 Apr 2013, 9:01 PM
Even I am facing the same issue?? Have anyone found a solution for this?