PDA

View Full Version : Textarea through CellEditing plugin is misaligned.



jingzhao.ou
8 Jan 2014, 3:22 PM
See the original post at

http://www.sencha.com/forum/showthread.php?279523-Textarea-through-CellEditing-plugin-is-not-popped-up-at-the-wrong-place

jsakalos from the Sencha Community Support team confirms that this is a bug with 4.2.1 and 4.2.2. I tested with 4.2.0 and 4.1.1 and things are fine there.

scottmartin
9 Jan 2014, 9:05 AM
Please see the following:
http://www.sencha.com/forum/showthread.php?273894-How-to-report-a-bug

Also..

have you tested this with our nightly builds? There has been some fixes in regards to grouping.

Scott.

scottmartin
9 Jan 2014, 9:09 AM
Here are a few quick example you can use to get started:
https://fiddle.sencha.com/#fiddle/20u
https://fiddle.sencha.com/#fiddle/2hr

jingzhao.ou
9 Jan 2014, 2:46 PM
I played with the Sencha Fiddle. This issue is not resolved in the nightly built. I made minor changes (the first column is changed from 'textfield' to 'textarea') to the first fiddler you pointed me to. The code is like:


Ext.onReady(function () {
Ext.create('Ext.data.Store', {
storeId : 'simpsonsStore',
fields : ['name', 'email', 'change'],
data : {'items' : [
{ 'name' : 'Lisa', 'email' : 'lisa@simpsons.com', 'change' : 100 },
{ 'name' : 'Bart', 'email' : 'bart@simpsons.com', 'change' : -20 },
{ 'name' : 'Homer', 'email' : 'homer@simpsons.com', 'change' : 23 },
{ 'name' : 'Marge', 'email' : 'marge@simpsons.com', 'change' : -11 }
]},
proxy : {
type : 'memory',
reader : {
type : 'json',
root : 'items'
}
}
});
var cellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit : 1
});
Ext.create('Ext.grid.Panel', {
title : 'Simpsons',
store : Ext.data.StoreManager.lookup('simpsonsStore'),
selModel : {
selType: 'cellmodel'
},
columns : [
{ header : 'Name', dataIndex : 'name', editor : { xtype : 'textarea' } },
{ header : 'Email', dataIndex : 'email', flex : 1, editor : { xtype : 'textfield' } },
{ header : 'Change', dataIndex : 'change', editor : { xtype : 'textfield' } }
],
height : 200,
width : 400,
renderTo : Ext.getBody(),
plugins : [ cellEditing ]
});
});

I can clearly see that the pop-up textarea is aligned with 4.2.0, but are misaligned with 4.2.1 and 1/8 nightly.

Let me know if you need more information.

Thanks a lot!
Jingzhao

scottmartin
9 Jan 2014, 3:51 PM
It seems to be center aligned. I take it you want it top aligned with the record?

jingzhao.ou
9 Jan 2014, 4:00 PM
The best case would be the pop-up textarea and the underlying cell be the same height. If the textarea grows/shrinks, so does the cell during editing.

If that cannot be done yet, my preference is top-aligned, just like the older releases. This is because the text is top aligned. User won't suddenly see that the text goes up a lot when editing a textarea.What do you think?

scottmartin
10 Jan 2014, 5:25 AM
The best case would be the pop-up textarea and the underlying cell be the same height.

Could you just have a trigger field that opens a window(borderless) that contains a textarea?

Or did I not understand?

jingzhao.ou
10 Jan 2014, 11:02 AM
Yes, that would be a good alternative for my case. Thanks a lot for the nice tips.